Skip to content

Commit e04b476

Browse files
committed
integrate jest with CI
1 parent 7282e95 commit e04b476

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

‎package.json‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,33 @@
8686
"schemas/"
8787
],
8888
"scripts": {
89-
"test": "node --no-deprecation node_modules/.bin/jest",
90-
"test:integration": "node --no-deprecation node_modules/.bin/jest --testMatch '<rootDir>/test/*.test.js'",
91-
"test:unit": "node --no-deprecation node_modules/.bin/jest --testMatch '<rootDir>/test/*.unittest.js'",
89+
"test": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest",
90+
"test:integration": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.test.js'",
91+
"test:unit": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.unittest.js'",
9292
"travis:integration": "npm run cover:init && npm run cover:integration && npm run cover:report-min",
9393
"travis:unit": "npm run cover:init && npm run cover:unit && npm run cover:report-min",
9494
"travis:lint": "npm run lint-files",
9595
"travis:benchmark": "npm run benchmark",
9696
"appveyor:integration": "npm run cover:init && npm run cover:integration && npm run cover:report-min",
9797
"appveyor:unit": "npm run cover:init && npm run cover:unit && npm run cover:report-min",
9898
"appveyor:benchmark": "npm run benchmark",
99-
"circleci:test": "node node_modules/mocha/bin/mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.test.js test/*.unittest.js",
99+
"circleci:test": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest",
100100
"circleci:lint": "npm run lint-files",
101101
"build:examples": "cd examples && node buildAll.js",
102102
"pretest": "npm run lint-files",
103103
"lint-files": "npm run lint && npm run beautify-lint && npm run schema-lint",
104104
"lint": "eslint lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
105105
"fix": "npm run lint -- --fix",
106106
"beautify-lint": "beautify-lint \"lib/**/*.js\" \"hot/**/*.js\" \"bin/**/*.js\" \"benchmark/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
107-
"schema-lint": "mocha test/*.lint.js --opts test/lint-mocha.opts",
108-
"benchmark": "mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.benchmark.js -R spec",
107+
"schema-lint": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.lint.js'",
108+
"benchmark": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<roorDir>/test/*.benchmark.js'",
109109
"cover": "npm run cover:init && npm run cover:all && npm run cover:report",
110110
"cover:init": "rimraf coverage",
111-
"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",
112-
"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",
113-
"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",
114-
"cover:report": "istanbul report",
115-
"cover:report-min": "istanbul report --report lcovonly",
111+
"cover:all": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --coverage",
112+
"cover:integration": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.test.js' --coverage",
113+
"cover:unit": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.unittest.js' --coverage",
114+
"cover:report": "echo report",
115+
"cover:report-min": "echo report --report lcovonly",
116116
"publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish"
117117
},
118118
"jest": {
@@ -132,6 +132,8 @@
132132
],
133133
"transformIgnorePatterns": [
134134
"<rootDir>/"
135-
]
135+
],
136+
"coverageDirectory": "<rootDir>/coverage",
137+
"coveragePathIgnorePatterns": ["\\.runtime\\.js$"]
136138
}
137139
}

0 commit comments

Comments
 (0)