mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Merge pull request #993 from gzzhanghao/tests
[web] Fix eslint warnings about tests
This commit is contained in:
commit
b48d1fa5b8
@ -5,6 +5,7 @@
|
|||||||
"test": "jest ./src/js"
|
"test": "jest ./src/js"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
|
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
|
||||||
"testPathDirs": [
|
"testPathDirs": [
|
||||||
"./src/js"
|
"./src/js"
|
||||||
],
|
],
|
||||||
@ -25,6 +26,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.5.2",
|
"babel-core": "^6.5.2",
|
||||||
|
"babel-jest": "^6.0.1",
|
||||||
"babel-preset-es2015": "^6.5.0",
|
"babel-preset-es2015": "^6.5.0",
|
||||||
"babel-preset-react": "^6.5.0",
|
"babel-preset-react": "^6.5.0",
|
||||||
"babelify": "^7.2.0",
|
"babelify": "^7.2.0",
|
||||||
@ -41,6 +43,7 @@
|
|||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
"gulp-sourcemaps": "^1.6.0",
|
"gulp-sourcemaps": "^1.6.0",
|
||||||
"gulp-util": "^3.0.7",
|
"gulp-util": "^3.0.7",
|
||||||
|
"jest": "^0.1.40",
|
||||||
"lodash": "^4.5.1",
|
"lodash": "^4.5.1",
|
||||||
"uglifyify": "^3.0.1",
|
"uglifyify": "^3.0.1",
|
||||||
"vinyl-buffer": "^1.0.0",
|
"vinyl-buffer": "^1.0.0",
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
jest.dontMock("jquery");
|
jest.dontMock("jquery");
|
||||||
jest.dontMock("../utils");
|
jest.dontMock("../utils");
|
||||||
|
|
||||||
|
import {formatSize} from "../utils.js"
|
||||||
|
|
||||||
describe("utils", function () {
|
describe("utils", function () {
|
||||||
import {formatSize} from "../utils.js"
|
|
||||||
it("formatSize", function(){
|
it("formatSize", function(){
|
||||||
expect(formatSize(1024)).toEqual("1kb");
|
expect(formatSize(1024)).toEqual("1kb");
|
||||||
expect(formatSize(0)).toEqual("0");
|
expect(formatSize(0)).toEqual("0");
|
||||||
|
Loading…
Reference in New Issue
Block a user