web: fix tests

This commit is contained in:
Maximilian Hils 2016-06-16 03:06:08 -07:00
parent 848e7c6c50
commit 1fc2db85fa
2 changed files with 9 additions and 12 deletions

View File

@ -2,18 +2,16 @@
"name": "mitmproxy",
"private": true,
"scripts": {
"test": "jest ./src/js"
"test": "jest"
},
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
"testPathDirs": [
"./src/js"
"<rootDir>/src/js"
],
"testPathIgnorePatterns": [
"/node_modules/",
"testutils.js"
],
"testDirectoryName": "tests"
"unmockedModulePathPatterns": [
"react",
"jquery"
]
},
"dependencies": {
"bootstrap": "^3.3.6",
@ -33,7 +31,7 @@
"devDependencies": {
"babel-core": "^6.7.7",
"babel-eslint": "^6.0.4",
"babel-jest": "^12.0.2",
"babel-jest": "^12.1.0",
"babel-plugin-transform-class-properties": "^6.6.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
@ -52,7 +50,7 @@
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-util": "^3.0.7",
"jest": "^0.1.40",
"jest": "^12.1.1",
"uglifyify": "^3.0.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",

View File

@ -1,5 +1,4 @@
jest.dontMock("jquery");
jest.dontMock("../utils");
jest.unmock("../utils.js");
import {formatSize} from "../utils.js"