Repository navigation
Commit aa165bf
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments