Skip to content

Commit dcaa028

Browse files
committed
test: convert integration tests to use jest
1 parent da5b73d commit dcaa028

25 files changed

+834
-1064
lines changed

.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
22
"env": {
3-
"node": true,
4-
"jest": true,
3+
"node": true
54
},
65
"plugins": [
76
"node",

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,10 @@
6161
"jest": "^23.6.0",
6262
"jsdoc": "~3.5.5",
6363
"lint-staged": "~7.2.0",
64-
"mocha": "~4.1.0",
6564
"nock": "~9.3.3",
66-
"nyc": "~12.0.2",
6765
"object.assign": "~4.1.0",
6866
"prettier": "~1.13.5",
6967
"semantic-release": "^15.9.3",
70-
"sinon": "~6.0.1",
7168
"tslint": "~5.10.0",
7269
"tslint-config-prettier": "~1.13.0",
7370
"tslint-eslint-rules": "~5.3.1",
@@ -116,12 +113,11 @@
116113
"doc": "jsdoc -c scripts/jsdoc/config.json",
117114
"minify": "uglifyjs --compress --mangle --output dist/watson.min.js --preamble \"// Watson Developer Cloud\n// JavaScript SDK$npm_package_version\n// Generated at `date`\n// Copyright IBM ($npm_package_license)\n// $npm_package_homepage\" -- dist/watson.js",
118115
"prepublishOnly": "npm run build",
119-
"test-integration": "mocha test/integration",
120-
"test-unit": "jest test/unit/",
121-
"test-unit-travis": "jest --silent --runInBand test/unit/ && codecov",
122-
"test": "npm run test-unit && npm run test-integration && nyc report --reporter=html",
123-
"test-travis": "npm run test-unit-travis && nyc mocha test/integration/ --grep @slow --invert && nyc report --reporter=html",
124-
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
116+
"test-integration": "jest --silent --verbose test/integration",
117+
"test-unit": "jest --silent --verbose test/unit/",
118+
"test": "npm run test-unit && npm run test-integration",
119+
"test-travis": "jest --silent --runInBand --testNamePattern='^((?!@slow).)*$' test/",
120+
"report-coverage": "codecov",
125121
"watch-doc": "nodemon --watch ./ --ext js,tmpl,json --ignore dist/ --ignore doc/ --ignore test/ --ignore examples/ --exec npm run doc",
126122
"watch": "npm run test-unit -- --watch",
127123
"watchify": "watchify index.js --standalone Watson --outfile dist/watson.js --debug --verbose"

test/.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
module.exports = {
22
env: {
33
node: true,
4-
mocha: true,
4+
jest: true,
55
},
66
rules: {
7-
'no-invalid-this': 'off', // This is part of mocha's api, but eslint's mocha env apparently doesn't get it
87
'require-jsdoc': 'off',
98
'valid-jsdoc': 'off',
109
},

0 commit comments

Comments
 (0)