Skip to content

Commit

Permalink
[Tests] 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 authored and ljharb committed Jan 7, 2024
1 parent 4a57fbe commit bcf6ce7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -64,6 +64,7 @@
"js-yaml": "^3.14.0",
"npm-run-posix-or-windows": "^2.0.2",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tap": "^8.0.1",
"tap-parser": "^5.4.0"
Expand All @@ -80,9 +81,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 bcf6ce7

Please sign in to comment.