Skip to content
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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ npm install
npm test
```

To run the tests on any windows system you need to use:

```bash
npm run test-windows
```

[npm-image]: https://img.shields.io/npm/v/oauth2-server.svg
[npm-url]: https://npmjs.org/package/oauth2-server
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Copy link
Member

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

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-debug": "set NODE_ENV=test&& node node_modules/mocha/bin/_mocha --inspect --debug-brk \"test\\**\\*_test.js\""
Copy link
Member

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

},
"repository": {
"type": "git",
Expand Down