aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/tests/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/tests/utils.js')
-rw-r--r--web/src/js/tests/utils.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/web/src/js/tests/utils.js b/web/src/js/tests/utils.js
index dfbb9ba6..1b6de264 100644
--- a/web/src/js/tests/utils.js
+++ b/web/src/js/tests/utils.js
@@ -2,14 +2,14 @@ jest.dontMock("jquery");
jest.dontMock("../utils");
describe("utils", function () {
- var utils = require("../utils");
+ import {formatSize} from "../utils.js"
it("formatSize", function(){
- expect(utils.formatSize(1024)).toEqual("1kb");
- expect(utils.formatSize(0)).toEqual("0");
- expect(utils.formatSize(10)).toEqual("10b");
- expect(utils.formatSize(1025)).toEqual("1.0kb");
- expect(utils.formatSize(1024*1024)).toEqual("1mb");
- expect(utils.formatSize(1024*1024+1)).toEqual("1.0mb");
+ expect(formatSize(1024)).toEqual("1kb");
+ expect(formatSize(0)).toEqual("0");
+ expect(formatSize(10)).toEqual("10b");
+ expect(formatSize(1025)).toEqual("1.0kb");
+ expect(formatSize(1024*1024)).toEqual("1mb");
+ expect(formatSize(1024*1024+1)).toEqual("1.0mb");
});
});