-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Test Commands for Windows #499
Conversation
Looks great. I had to do roughly the same thing to test on my Windows machine. |
Looks good, I've added a couple of reviews. Please could you address and then squash into a single commit |
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.
Reviews as mentioned
@@ -56,7 +56,9 @@ | |||
"scripts": { | |||
"pretest": "./node_modules/.bin/jshint --config ./.jshintrc lib test", | |||
"test": "NODE_ENV=test ./node_modules/.bin/mocha 'test/**/*_test.js'", | |||
"test-debug": "NODE_ENV=test ./node_modules/.bin/mocha --inspect --debug-brk 'test/**/*_test.js'" | |||
"test-windows": "set NODE_ENV=test&& node node_modules/mocha/bin/_mocha \"test\\**\\*_test.js\"", |
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.
Will this work with a space before the &&
? If so, please add one
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.
cross-env NODE_ENV=test ./node_modules/.bin/mocha --inspect --debug-brk 'test/**/*_test.js'
suggestion cross-env
"test-debug": "NODE_ENV=test ./node_modules/.bin/mocha --inspect --debug-brk 'test/**/*_test.js'" | ||
"test-windows": "set NODE_ENV=test&& node node_modules/mocha/bin/_mocha \"test\\**\\*_test.js\"", | ||
"test-debug": "NODE_ENV=test ./node_modules/.bin/mocha --inspect --debug-brk 'test/**/*_test.js'", | ||
"test-windows-debug": "set NODE_ENV=test&& node node_modules/mocha/bin/_mocha --inspect --debug-brk \"test\\**\\*_test.js\"" |
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.
Same as above, if this works with a space before the &&
, please add one
Two suggestions that might make it possible to have just a single
So the test commands might just look like this: {
"test": "npx mocha 'test/**/*_test.js'",
"test-debug": "npx mocha --inspect --debug-brk 'test/**/*_test.js'"
} Edit: NVM, 5.0 has more or less exactly this. 🙃 |
Hey there,
I've just came across the fact that the npm test and npm run test-debug commands ain't working on a Windows Operating System and here is my Suggestion.
Greetings
Not Adrian