Skip to content

Commit d35d0fe

Browse files
Technical/issue 293 mocha refactor (#294)
* move mocha config to dotfile * un only spec * piggy back test script for tdd
1 parent bf3fc20 commit d35d0fe

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/node_modules/**
2-
!.eslintrc.js
2+
!.eslintrc.js
3+
!.mocharc.js

.mocharc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
spec: path.join(__dirname, 'packages/**/test/**/**/**/*.spec.js'),
5+
timeout: 30000
6+
};

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"build": "yarn clean && node . build",
2121
"serve": "yarn build && cd ./public && ws",
2222
"develop": "yarn clean && node . develop",
23-
"test": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && nyc mocha ./packages/**/test/**/**/*.spec.js --timeout 30000",
24-
"test:tdd": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && mocha --watch ./packages/**/test/**/**/*.spec.js --timeout 15000"
23+
"test": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && nyc mocha",
24+
"test:tdd": "yarn test --watch"
2525
},
2626
"devDependencies": {
2727
"chai": "^4.2.0",

0 commit comments

Comments
 (0)