|
41 | 41 | "es6-promise-polyfill": "^1.1.1", |
42 | 42 | "eslint": "^4.19.1", |
43 | 43 | "eslint-config-prettier": "^2.9.0", |
| 44 | + "eslint-plugin-jest": "21.12.2", |
44 | 45 | "eslint-plugin-node": "^6.0.1", |
45 | 46 | "eslint-plugin-prettier": "^2.6.0", |
46 | 47 | "express": "~4.13.1", |
|
50 | 51 | "istanbul": "^0.4.5", |
51 | 52 | "jade": "^1.11.0", |
52 | 53 | "jade-loader": "~0.8.0", |
| 54 | + "jest": "23.0.0-alpha.5", |
| 55 | + "jest-silent-reporter": "0.0.4", |
53 | 56 | "json-loader": "^0.5.7", |
54 | 57 | "less": "^2.5.1", |
55 | 58 | "less-loader": "^4.0.3", |
56 | 59 | "lodash": "^4.17.4", |
57 | | - "mocha": "^3.2.0", |
58 | | - "mocha-lcov-reporter": "^1.0.0", |
59 | 60 | "prettier": "^1.11.1", |
60 | 61 | "raw-loader": "~0.5.0", |
61 | 62 | "react": "^15.2.1", |
62 | 63 | "react-dom": "^15.2.1", |
63 | 64 | "rimraf": "^2.6.2", |
64 | 65 | "script-loader": "~0.7.0", |
65 | | - "should": "^11.1.1", |
66 | 66 | "simple-git": "^1.65.0", |
67 | 67 | "sinon": "^2.3.2", |
68 | 68 | "style-loader": "^0.19.1", |
|
96 | 96 | ], |
97 | 97 | "scripts": { |
98 | 98 | "setup": "node ./setup/setup.js", |
99 | | - "test": "npm run mocha", |
100 | | - "mocha": "mocha test/*.test.js test/*.unittest.js --max-old-space-size=4096 --harmony --trace-deprecation", |
101 | | - "test:integration": "mocha test/*.test.js --max-old-space-size=4096 --harmony --trace-deprecation", |
102 | | - "test:unit": "mocha test/*.unittest.js --max-old-space-size=4096 --harmony --trace-deprecation", |
103 | | - "travis:integration": "yarn cover:init && yarn cover:integration && yarn cover:report-min", |
104 | | - "travis:unit": "yarn cover:init && yarn cover:unit && yarn cover:report-min", |
| 99 | + "test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest", |
| 100 | + "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"", |
| 101 | + "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"", |
| 102 | + "travis:integration": "yarn cover:init && yarn cover:integration --ci $JEST && yarn cover:report-min", |
| 103 | + "travis:unit": "yarn cover:init && yarn cover:unit --ci", |
105 | 104 | "travis:lint": "yarn lint", |
106 | | - "travis:benchmark": "yarn benchmark", |
107 | | - "appveyor:integration": "yarn cover:init && yarn cover:integration && yarn cover:report-min", |
108 | | - "appveyor:unit": "yarn cover:init && yarn cover:unit && yarn cover:report-min", |
109 | | - "appveyor:benchmark": "yarn benchmark", |
110 | | - "circleci:test": "node node_modules/mocha/bin/mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.test.js test/*.unittest.js", |
| 105 | + "travis:benchmark": "yarn benchmark --ci", |
| 106 | + "appveyor:integration": "yarn cover:init && yarn cover:integration --ci %JEST% && yarn cover:report-min", |
| 107 | + "appveyor:unit": "yarn cover:init && yarn cover:unit --ci && yarn cover:report-min", |
| 108 | + "appveyor:benchmark": "yarn benchmark --ci", |
| 109 | + "circleci:test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --ci", |
111 | 110 | "circleci:lint": "yarn lint", |
112 | 111 | "build:examples": "cd examples && node buildAll.js", |
113 | 112 | "pretest": "yarn lint", |
|
117 | 116 | "type-lint": "tsc --pretty", |
118 | 117 | "fix": "yarn code-lint --fix", |
119 | 118 | "pretty": "prettier \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" --write", |
120 | | - "schema-lint": "mocha test/*.lint.js --opts test/lint-mocha.opts", |
121 | | - "benchmark": "mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.benchmark.js -R spec", |
| 119 | + "schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.lint.js\"", |
| 120 | + "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand", |
122 | 121 | "cover": "yarn cover:init && yarn cover:all && yarn cover:report", |
123 | 122 | "cover:init": "rimraf coverage", |
124 | | - "cover:all": "node --max-old-space-size=4096 --harmony --trace-deprecation ./node_modules/istanbul/lib/cli.js cover --report none node_modules/mocha/bin/_mocha -- test/*.test.js test/*.unittest.js", |
125 | | - "cover:integration": "node --max-old-space-size=4096 --harmony --trace-deprecation ./node_modules/istanbul/lib/cli.js cover --report none node_modules/mocha/bin/_mocha -- test/*.test.js", |
126 | | - "cover:unit": "node --max-old-space-size=4096 --harmony --trace-deprecation ./node_modules/istanbul/lib/cli.js cover --report none node_modules/mocha/bin/_mocha -- test/*.unittest.js", |
| 123 | + "cover:all": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --coverage", |
| 124 | + "cover:integration": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\" --coverage", |
| 125 | + "cover:unit": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage", |
127 | 126 | "cover:report": "istanbul report", |
128 | 127 | "cover:report-min": "istanbul report --report lcovonly" |
| 128 | + }, |
| 129 | + "jest": { |
| 130 | + "setupTestFrameworkScriptFile": "<rootDir>/test/setupTestFramework.js", |
| 131 | + "testMatch": [ |
| 132 | + "<rootDir>/test/*.test.js", |
| 133 | + "<rootDir>/test/*.unittest.js" |
| 134 | + ], |
| 135 | + "watchPathIgnorePatterns": [ |
| 136 | + "<rootDir>/node_modules/webpack/node_modules/", |
| 137 | + "<rootDir>/test/js/", |
| 138 | + "<rootDir>/test/browsertest/js/", |
| 139 | + "<rootDir>/test/fixtures/temp-cache-fixture/", |
| 140 | + "<rootDir>/test/fixtures/temp-", |
| 141 | + "<rootDir>/benchmark/", |
| 142 | + "<rootDir>/examples/*/dist", |
| 143 | + "<rootDir>/coverage/" |
| 144 | + ], |
| 145 | + "modulePathIgnorePatterns": [ |
| 146 | + "<rootDir>/node_modules/webpack/node_modules/", |
| 147 | + "<rootDir>/test/js/", |
| 148 | + "<rootDir>/test/browsertest/js/", |
| 149 | + "<rootDir>/test/fixtures/temp-cache-fixture/", |
| 150 | + "<rootDir>/test/fixtures/temp-", |
| 151 | + "<rootDir>/benchmark/", |
| 152 | + "<rootDir>/examples/*/dist", |
| 153 | + "<rootDir>/coverage/" |
| 154 | + ], |
| 155 | + "transformIgnorePatterns": [ |
| 156 | + "<rootDir>/" |
| 157 | + ], |
| 158 | + "coverageDirectory": "<rootDir>/coverage", |
| 159 | + "coveragePathIgnorePatterns": [ |
| 160 | + "\\.runtime\\.js$", |
| 161 | + "<rootDir>/test/", |
| 162 | + "<rootDir>/schemas/" |
| 163 | + ], |
| 164 | + "testEnvironment": "node", |
| 165 | + "coverageReporters": [ |
| 166 | + "json" |
| 167 | + ] |
129 | 168 | } |
130 | 169 | } |
0 commit comments