diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-03-02 17:50:59 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-03-02 17:50:59 +0100 |
commit | b48d1fa5b8995bbacf3c89df397c466f786e7754 (patch) | |
tree | 4e0594829caa23823f847d7effb52d6eb099895d /web | |
parent | fab9dad940d6db15bb671a557fd51d1241e4ecbe (diff) | |
parent | 70cde8ccaa2fd0a19645d003109a95ec4ffc8af1 (diff) | |
download | mitmproxy-b48d1fa5b8995bbacf3c89df397c466f786e7754.tar.gz mitmproxy-b48d1fa5b8995bbacf3c89df397c466f786e7754.tar.bz2 mitmproxy-b48d1fa5b8995bbacf3c89df397c466f786e7754.zip |
Merge pull request #993 from gzzhanghao/tests
[web] Fix eslint warnings about tests
Diffstat (limited to 'web')
-rw-r--r-- | web/package.json | 3 | ||||
-rw-r--r-- | web/src/js/tests/utils.js | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/web/package.json b/web/package.json index a1b42d01..63a664ae 100644 --- a/web/package.json +++ b/web/package.json @@ -5,6 +5,7 @@ "test": "jest ./src/js" }, "jest": { + "scriptPreprocessor": "<rootDir>/node_modules/babel-jest", "testPathDirs": [ "./src/js" ], @@ -25,6 +26,7 @@ }, "devDependencies": { "babel-core": "^6.5.2", + "babel-jest": "^6.0.1", "babel-preset-es2015": "^6.5.0", "babel-preset-react": "^6.5.0", "babelify": "^7.2.0", @@ -41,6 +43,7 @@ "gulp-rename": "^1.2.2", "gulp-sourcemaps": "^1.6.0", "gulp-util": "^3.0.7", + "jest": "^0.1.40", "lodash": "^4.5.1", "uglifyify": "^3.0.1", "vinyl-buffer": "^1.0.0", diff --git a/web/src/js/tests/utils.js b/web/src/js/tests/utils.js index 1b6de264..acbadc92 100644 --- a/web/src/js/tests/utils.js +++ b/web/src/js/tests/utils.js @@ -1,8 +1,9 @@ jest.dontMock("jquery"); jest.dontMock("../utils"); +import {formatSize} from "../utils.js" + describe("utils", function () { - import {formatSize} from "../utils.js" it("formatSize", function(){ expect(formatSize(1024)).toEqual("1kb"); expect(formatSize(0)).toEqual("0"); |