diff --git a/.mocha b/.mocha deleted file mode 100644 index d059ed9e4..000000000 --- a/.mocha +++ /dev/null @@ -1,5 +0,0 @@ ---require @babel/core ---require @babel/register ---require jsdom ---require ./src/test/test-dom.js ---require ./src/test/ignore-styles.js \ No newline at end of file diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 000000000..e1d453f70 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,21 @@ +{ + "diff": true, + "extension": ["js", "jsx"], + "opts": false, + "package": "./package.json", + "reporter": "spec", + "slow": 75, + "timeout": 2000, + "ui": "bdd", + "watch-files": ["lib/**/*.js", "test/**/*.js"], + "watch-ignore": ["lib/vendor"], + "recursive": true, + "exit": true, + "ignore":["node_modules"], + "require":["@babel/core", + "@babel/register", + "jsdom", + "./src/test/test-dom.js", + "./src/test/ignore-styles.js" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 5f8c89832..4c7509d41 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "start": "REACT_APP_VERSION=$npm_package_version PORT=5000 react-scripts start", "build": "REACT_APP_VERSION=$npm_package_version react-scripts build", "coverage": "nyc report --reporter=text-lcov > coverage/coverage.lcov && codecov", - "test": "NODE_ENV=test NODE_PATH=./src nyc mocha --opts ./.mocha --exit --recursive 'src/**/*.test.js*'", + "test": "NODE_ENV=test NODE_PATH=./src nyc mocha src/**/*.test.js*", "eject": "react-scripts eject", "deploy": "gh-pages -d build", "deploy-experimental": "gh-pages -r https://github.com/rashley-iqt/CRviz -d build",