mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
apply PR review
Signed-off-by: Ky <virginie.ky@gmail.com>
This commit is contained in:
parent
2619bfd5f5
commit
75a41061c1
@ -10,23 +10,23 @@ describe('UPLOAD | components | EditForm | utils', () => {
|
||||
expect(formatBytes(0.9)).toEqual('900B');
|
||||
});
|
||||
|
||||
it("should return 1KB if '1024' Bytes is passed", () => {
|
||||
it("should return 1MB if '1024' Bytes is passed", () => {
|
||||
expect(formatBytes('1024')).toEqual('1MB');
|
||||
});
|
||||
|
||||
it('should return 1.18MB if 1034 Bytes is passed', () => {
|
||||
it('should return 1MB if 1234 is passed', () => {
|
||||
expect(formatBytes(1234)).toEqual('1MB');
|
||||
});
|
||||
|
||||
it('should return 1.18MB if 1034 Bytes is passed', () => {
|
||||
it('should return 1.23MB if 1234 Bytes is passed with 2 decimals', () => {
|
||||
expect(formatBytes(1234, 2)).toEqual('1.23MB');
|
||||
});
|
||||
|
||||
it('should return 1.177MB if 1234 Bytes is passed with 3 decimals', () => {
|
||||
it('should return 1.234MB if 1234 Bytes is passed with 3 decimals', () => {
|
||||
expect(formatBytes(1234, 3)).toEqual('1.234MB');
|
||||
});
|
||||
|
||||
it('should return 1 GB if 1.1e+6 Bytes is passed', () => {
|
||||
it('should return 1GB if 1100000 is passed', () => {
|
||||
expect(formatBytes(1100000, 0)).toEqual('1GB');
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user