fix: Windows typecheck false failure after tests pass - #6
Merged
cursor[bot] merged 2 commits intoJul 20, 2026
Conversation
Students saw "Test failed (exit code 1)" after all node:test checks passed because typecheck-modules built fast-glob patterns with path.join(), which uses backslashes on Windows and matches nothing. Patch the installed CLI after install to normalize glob paths to forward slashes so directory typechecks work cross-platform. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Replace the local postinstall patch with @kentcdodds/typecheck-modules@1.0.1, which normalizes fast-glob paths on Windows so typechecks no longer fail after all runtime tests pass. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
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
Students on Windows (reported via Ensign College) saw Test failed (exit code 1) even when every
node:testassertion passed. Screenshot from exercise 4.1 showed all 6 tests green, then:Root cause:
@kentcdodds/typecheck-modulesbuiltfast-globpatterns withpath.join(), which uses backslashes on Windows.fast-globtreats those as escapes and matches nothing, so the CLI exited 1 after a clean test run.Fix
Fixed upstream and released via semantic-release + npm trusted publishing:
@kentcdodds/typecheck-modules@1.0.1^1.0.0→^1.0.1(local postinstall patch removed)Test plan
1.0.1published to npmnpx epicshop playground set 4.1.solution && npm test→ exit 0node ./epicshop/test.js ..s→ all solutions pass