Skip to content

Commit

Permalink
chore: group mocha options into test/mocha.opts
Browse files Browse the repository at this point in the history
Dryer and help when wanting to run one specific test file (e.g. 
`mocha test/spec/lib/util.js`).
  • Loading branch information
dinoboff committed May 13, 2018
1 parent 1cc4778 commit e4151e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>",
"license": "ISC",
Expand Down
3 changes: 3 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--require test/setup.js
--recursive
--bail

0 comments on commit e4151e7

Please sign in to comment.