diff --git a/package.json b/package.json index d1a5d3f..fe766e7 100644 --- a/package.json +++ b/package.json @@ -26,17 +26,17 @@ }, "scripts": { "build": "nearleyc lib/parser/regexp/parser.ne -o lib/parser/regexp/parser.js", - "coverage": "npm run build && istanbul cover --print detail node_modules/.bin/_mocha -- --require test/setup.js --recursive -b test/spec/", + "coverage": "npm run build && istanbul cover --print detail node_modules/.bin/_mocha -- test/spec/", "coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", "fixtures": "./bin/targaryen-specs -v -i -s test/spec/lib/parser/fixtures.json", "format": "npm run lint -- --fix", "lint": "eslint lib/ plugins/ test/ bin/targaryen", "lint:html": "(npm run -s lint -- --max-warnings 0 -f html -o lint.html && rm lint.html) || echo 'open lint.html for linting errors'", "prepare": "npm run build", - "test": "npm run build && mocha -r test/setup.js test/spec/ --recursive && jasmine && node ./bin/targaryen --verbose test/integration/rules.json test/integration/tests.json", - "test:unit": "mocha -r test/setup.js test/spec/ --recursive", + "test": "npm run build && mocha test/spec/ && jasmine && node ./bin/targaryen --verbose test/integration/rules.json test/integration/tests.json", + "test:unit": "mocha test/spec/", "test:plugin:jest": "jest --colors test/jest", - "test:inspect": "node --inspect --debug-brk node_modules/.bin/_mocha -r test/setup.js test/spec/ --recursive" + "test:inspect": "node --inspect --debug-brk node_modules/.bin/_mocha test/spec/" }, "author": "Harry Schmidt ", "license": "ISC", diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 0000000..6a88123 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1,3 @@ +--require test/setup.js +--recursive +--bail