Skip to content

Quote test glob so npm test runs on Windows - #2

Open
MrTig-afk wants to merge 1 commit into
nitrosend:mainfrom
MrTig-afk:fix/windows-test-glob
Open

Quote test glob so npm test runs on Windows#2
MrTig-afk wants to merge 1 commit into
nitrosend:mainfrom
MrTig-afk:fix/windows-test-glob

Conversation

@MrTig-afk

Copy link
Copy Markdown

On Windows, npm test reports success while running zero tests. npm scripts run under cmd.exe, which passes single quotes through literally, so node --test 'src/**/*.test.ts' matches no files and exits 0.

Fix: escaped double quotes in the test script. cmd.exe and sh both strip them, and node's glob expansion handles the pattern on both platforms.

Verification: before, # tests 0 with exit 0. After, 33/33 run and pass.

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