ci: fix Windows CI to actually run Node.js tests#606
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the package.json build and test scripts by removing quotes from pnpm filter patterns. Additionally, it refactors the test suites in args.test.ts and config-discovery.test.ts to use platform-appropriate absolute paths via a new helper function and path.resolve. These changes improve the cross-platform compatibility of the tests, particularly on Windows and macOS. I have no feedback to provide as there were no review comments to assess.
f42424c to
5fce749
Compare
7357c30 to
dcdddc3
Compare
Test infrastructure fixes: - Fix CLI test helpers: use spawn(process.execPath, [bin, ...args]) instead of spawn(bin, args) (Windows has no shebang support for .cjs) - Fix basic.test.ts: replace \r\n in filename (forbidden on NTFS) - Fix args.test.ts: use path.resolve() instead of hardcoded Unix paths - Fix config-discovery.test.ts: use cross-platform paths - Fix type-check snapshot normalizeOutput: handle Windows absolute paths and 8.3 short name relative paths Windows path matching fixes: - buildProgramFileSet: add Realpath'd key alongside original so lookups from filepath.EvalSymlinks match even when os.Getwd() returns 8.3 short names (Windows) or unresolved symlinks (macOS) - cmd.go: store both pre/post EvalSymlinks paths in allowDirs so dir scoping works with either path format
dcdddc3 to
c8d96b8
Compare
simplyme0823
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows CI was silently skipping all Node.js tests due to multiple issues:
--filterinbuild/testscripts —cmd.exedoes not strip single quotes, causing filters to match zero projectsspawn(process.execPath, [bin, ...args])instead ofspawn(bin, args)— Windows cannot directly execute.cjsfiles (no shebang support)basic.test.ts: replace\r\nin test filename (forbidden on NTFS) with%,which are NTFS-safe but still test URL encodingargs.test.ts: usepath.resolve()for expected values instead of hardcoded Unix pathsconfig-discovery.test.ts: replace hardcoded/project/...paths with cross-platform paths usingpath.resolve+path.jointype-check-snapshotnormalizeOutput: handle Windows absolute paths and 8.3 short name relative paths in snapshot normalizationRelated Links
Checklist