-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed tests running two times for npm run test #336
Conversation
"build-sample-proj": "node ./bin/enb make -n --graph --dir test/fixtures/sample-project", | ||
"check-style": "jscs -c node_modules/enb-validate-code/jscs.json lib exlib techs test", | ||
"coverage": "istanbul cover _mocha", | ||
"coverage": "istanbul cover _mocha --recursive test/lib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я бы тут оставил -R dot
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
почему-то вылетает с подобной ошибкой:
Error: cannot resolve path (or pattern) 'dot' at Object.lookupFiles (/Users/matumbaman/Documents/enb/node_modules/mocha/lib/utils.js:494:32) at runAgain (/Users/matumbaman/Documents/enb/node_modules/mocha/bin/_mocha:316:30) at Array.forEach (native) at Object.<anonymous> (/Users/matumbaman/Documents/enb/node_modules/mocha/bin/_mocha:315:6) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Object.Module._extensions.(anonymous function) [as .js] (/Users/matumbaman/Documents/enb/node_modules/istanbul/lib/hook.js:109:37) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) ...
Почему-то после этого изменения coverage подскочил до 86%. Кажется, что где-то ошибка. |
Прочитал скрипт ещё раз - а почему не должно сработать? |
Поменял |
@@ -87,11 +87,11 @@ | |||
"scripts": { | |||
"test": "npm run jshint && npm run check-style && npm run func-test && npm run unit-test", | |||
"jshint": "jshint .", | |||
"unit-test": "mocha -u bdd -R spec --recursive test/lib", | |||
"func-test": "npm run build-sample-proj && mocha -u bdd -R spec --recursive test/func", | |||
"unit-test": "mocha --recursive test/lib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А тут все тесты запускаются?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да, все, там была особенность передачи опций в istanbul
Переписал скрипты с учётом того, что разобрались, для чего нужна опция |
🆗 |
Fixed tests running two times for npm run test
resolves #334