Skip to content

fix: make test script glob cross-platform for Windows - #1

Open
supunyasanthaofficial wants to merge 1 commit into
hanzoai:mainfrom
supunyasanthaofficial:fix/cross-platform-test-glob
Open

supunyasanthaofficial wants to merge 1 commit into
hanzoai:mainfrom
supunyasanthaofficial:fix/cross-platform-test-glob

Conversation

@supunyasanthaofficial

Copy link
Copy Markdown

Summary

The test script in package.json was not working correctly on Windows because the test glob pattern was wrapped in single quotes.

Windows shells like CMD and PowerShell don't handle single quotes the same way as Unix shells. As a result, Node.js received the quotes as part of the path and couldn't find the test files, so no tests were executed.

Fix

Changed the single quotes to escaped double quotes:

"test": "node --test --experimental-strip-types \"src/**/*.test.ts\""

Testing

Verified the fix on Windows using pnpm test.

  • Before: No tests were discovered or executed (0 tests).
  • After: All 39 tests were discovered and passed successfully.

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