Skip to content

Commit 5bdcbf4

Browse files
committed
fix: make npm test run on Windows (node <21)
The test scripts pass a 'tests/*.test.js' / './test/*.test.js' glob to node --test. POSIX shells expand it, but cmd.exe does not and node <21 does not glob --test paths natively, so npm test fails for every Windows contributor with 'Could not find ...'. Pass the directory instead; node discovers the *.test.js files itself. Same files run (verified), now cross-platform.
1 parent adad50d commit 5bdcbf4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"keywords": ["pi-package", "pi", "skills", "ponytail"],
66
"license": "MIT",
77
"scripts": {
8-
"test": "node --test tests/*.test.js && npm test --prefix pi-extension"
8+
"test": "node --test tests/ && npm test --prefix pi-extension"
99
},
1010
"pi": {
1111
"extensions": ["./pi-extension/index.js"],

‎pi-extension/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"test": "node --test ./test/*.test.js"
6+
"test": "node --test ./test/"
77
}
88
}

0 commit comments

Comments
 (0)