Skip to content

fix: Windows typecheck false failure after tests pass - #6

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-typecheck-modules-windows-glob-e17e
Jul 20, 2026
Merged

fix: Windows typecheck false failure after tests pass#6
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-typecheck-modules-windows-glob-e17e

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Students on Windows (reported via Ensign College) saw Test failed (exit code 1) even when every node:test assertion passed. Screenshot from exercise 4.1 showed all 6 tests green, then:

No .ts/.tsx files found in C:\Users\...\type-safety\playground

Root cause: @kentcdodds/typecheck-modules built fast-glob patterns with path.join(), which uses backslashes on Windows. fast-glob treats 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:

Test plan

  • Upstream CI green on Ubuntu + Windows
  • 1.0.1 published to npm
  • npx epicshop playground set 4.1.solution && npm test → exit 0
  • node ./epicshop/test.js ..s → all solutions pass
  • Confirm on a Windows machine that playground typecheck no longer reports “No .ts/.tsx files found”
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 20, 2026 18:15
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>
@kentcdodds
kentcdodds marked this pull request as ready for review July 20, 2026 19:07
@cursor
cursor Bot merged commit 0c17399 into main Jul 20, 2026
6 checks passed
@cursor
cursor Bot deleted the cursor/fix-typecheck-modules-windows-glob-e17e branch July 20, 2026 19:08
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.

2 participants