Skip to content

Fix npm test on Node 24: use explicit glob instead of directory path - #12

Merged
ather-techie merged 1 commit into
mainfrom
fix/node-test-glob
Sep 15, 2026
Merged

ather-techie merged 1 commit into
mainfrom
fix/node-test-glob

Conversation

@ather-techie

Copy link
Copy Markdown
Owner

Summary

  • Deploy run #41 (and PR Feature/scenario tag #11's Check run) failed in "Run unit tests" with MODULE_NOT_FOUND for scripts/lib.
  • Cause: on Node 24 (CI), node --test treats its argument as a glob pattern, so scripts/lib/ matched the directory itself and was loaded as a test file. Node 26 (local) accepts directories, which is why it passed locally.
  • Fix: "test": "node --test \"scripts/lib/*.test.mjs\"". Quoted so Node expands the glob identically on Windows and Linux.

Verification

  • npm run ci locally: 13/13 tests pass, check, readme:check, and build succeed.
  • The Check workflow on this PR runs on Node 24 and should now go green.

🤖 Generated with Claude Code

node --test treats positional args as glob patterns on Node 24, so
"scripts/lib/" matched the directory itself and failed with
MODULE_NOT_FOUND. Node 26 (used locally) accepts directories, which is
why it passed locally but failed in CI.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ather-techie
ather-techie merged commit 3744aca into main Sep 15, 2026
1 check passed
@ather-techie
ather-techie deleted the fix/node-test-glob branch September 21, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant