diff --git a/.eslintignore b/.eslintignore index 2123dd846..f70595457 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ **/node_modules/** -!.eslintrc.js \ No newline at end of file +!.eslintrc.js +!.mocharc.js \ No newline at end of file diff --git a/.mocharc.js b/.mocharc.js new file mode 100644 index 000000000..61504b775 --- /dev/null +++ b/.mocharc.js @@ -0,0 +1,6 @@ +const path = require('path'); + +module.exports = { + spec: path.join(__dirname, 'packages/**/test/**/**/**/*.spec.js'), + timeout: 30000 +}; \ No newline at end of file diff --git a/package.json b/package.json index 7eb5e58b1..9cda067de 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "build": "yarn clean && node . build", "serve": "yarn build && cd ./public && ws", "develop": "yarn clean && node . develop", - "test": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && nyc mocha ./packages/**/test/**/**/*.spec.js --timeout 30000", - "test:tdd": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && mocha --watch ./packages/**/test/**/**/*.spec.js --timeout 15000" + "test": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && nyc mocha", + "test:tdd": "yarn test --watch" }, "devDependencies": { "chai": "^4.2.0",