{
"name": "mitmproxy",
"version": "0.12",
"dependencies": {
"jquery": "",
"lodash": "",
"react": "",
"react-router": "",
"fontawesome": "",
"qunit": "",
"benchmark": "",
"benchmarkjs-runner": "",
"bootstrap": "",
"react-bootstrap": ""
},
"install": {
"path": "src/vendor",
"sources": {
"lodash": "bower_components/lodash/dist/lodash.js",
"react": ["bower_components/react/react-with-addons.js", "bower_components/react/JSXTransformer.js"],
"react-bootstrap": "bower_components/react-bootstrap/react-bootstrap.js"
}
}
}c='/cgit.png' alt='cgit logo'/>
blob: acbadc92eceb4f87afe6ab3a5399686188b7b61e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
jest.dontMock("jquery");
jest.dontMock("../utils");
import {formatSize} from "../utils.js"
describe("utils", function () {
it("formatSize", function(){
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");
});
});
|