Skip to content

Commit

Permalink
[Fix] npm test on windows
Browse files Browse the repository at this point in the history
The version of "nyc" (v9) that is being used does not support launching binaries from node_modules/.bin on windows. As a workaround the path to tap's run.js is specified. Newer version of nyc fix this issue, however those versions drop support for older node versions that we still want to support here.

Also, the windows shell does not understand single quotes.
  • Loading branch information
Joris-van-der-Wel committed Jan 9, 2024
1 parent 03cdefa commit fc33439
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@
"prelint": "npm-run-posix-or-windows eclint",
"lint": "eslint --ext .js,.cjs,.mjs . bin/*",
"pretest": "npm run lint",
"test": "npm run tests-only",
"test": "npm-run-posix-or-windows tests-only",
"posttest": "aud --production",
"tests-only": "nyc tap 'test/*.js'",
"tests-only:windows": "nyc node_modules\\tap\\bin\\run.js test/*.js",
"test:example": "find example -name '*.js' | grep -v fail | grep -v static | xargs tap"
},
"testling": {
Expand Down

0 comments on commit fc33439

Please sign in to comment.