Skip to content

Commit aa165bf

Browse files
noneckclaude
andcommitted
fix(ci): use shell-expanded glob for test files (Node 20 compat)
The test script used `node --test "test/**/*.test.js"` — a quoted recursive glob. Glob-pattern support for the `--test` CLI flag is a SEMVER-MAJOR feature added in Node.js 21 (nodejs/node#47653) and was never backported to Node 20. On Node 20 the quoted string is treated as a literal file path, producing: Could not find '.../test/**/*.test.js' which failed the Node 20 job of PR #4 (Node 22 passed). Fix: drop the quotes and the `**` and use `node --test test/*.test.js`, letting the shell expand the glob to explicit file paths before Node runs. Explicit paths are accepted by every Node version, so this works identically on 20.x and 22.x. This matches the proven pattern in the sibling nyc-charter-laws-rules repo (green on the same [20.x, 22.x] matrix). Both test files are flat in test/, so a single-star glob covers them; no directory restructuring needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent bbd03bf commit aa165bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"prepare": "npm run build",
4444
"fetch-data": "node scripts/fetch-data.js",
4545
"sync": "node scripts/sync.js",
46-
"test": "npm run build && node --test \"test/**/*.test.js\""
46+
"test": "npm run build && node --test test/*.test.js"
4747
},
4848
"dependencies": {
4949
"@modelcontextprotocol/sdk": "^1.0.0",

0 commit comments

Comments
 (0)