Skip to content

test(registry): fix Windows test failures and run tests on Windows in CI - #159

Merged
moshest merged 1 commit into
mainfrom
claude/project-thread-ipfobz
Sep 24, 2026
Merged

moshest merged 1 commit into
mainfrom
claude/project-thread-ipfobz

Conversation

@moshest

@moshest moshest commented Sep 24, 2026

Copy link
Copy Markdown
Member

Requested by Moshe · project thread

Before: three @neuledge/registry tests failed on windows-latest. Turbo stopped at that first failure, so CI couldn't run any tests on Windows, including the @neuledge/context suite.

After: the registry suite passes on Windows, and the CI test job runs on both Linux and Windows. The Linux check keeps its name, Test, so the existing required check still matches it.

Fixes #153.

How:

  • publish-all.test.ts ran the CLI through execFileSync("npx", ["tsx", ...]). On Windows, npx is a .cmd shim, and execFileSync can't launch that without a shell. The spawn failed and both tests got empty output (expected '' to contain '--- Summary ---' in run 289). The tests now run process.execPath --import tsx src/cli.ts, which starts a real process on every platform.
  • The definition.test.ts backslash test writes @apollo\client.yaml so Linux can reproduce the string Windows produces. On Windows the backslash is a real path separator, so the write targets a missing @apollo directory and fails with ENOENT. The test is now skipped on Windows only. There, the @trpc/server scoped test already runs the same relative() normalization for real.
  • ci.yml: the test job uses a matrix of ubuntu-latest ("Test") and windows-latest ("Test (Windows)"), with fail-fast: false.

Tested on Linux: pnpm lint, pnpm build and pnpm test pass. This PR's CI is the first run of the full suite on Windows.

🤖 Generated with Claude Code

https://claude.ai/code/session_017Exdaq6aMDKKhN9hihK7Nz


Generated by Claude Code

The publish-all tests spawned `npx tsx`, which execFileSync can't launch on
Windows (npx is a .cmd shim), so they saw empty output. Run node with tsx as
a loader instead.

The backslash-filename test simulates Windows on Linux; on Windows it writes
into a missing directory. Skip it there, where the @trpc/server test covers
the same path natively.

Add windows-latest to the CI test job, keeping the Linux check named "Test".

Fixes #153

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Exdaq6aMDKKhN9hihK7Nz
@changeset-bot

changeset-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2c1005c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@moshest moshest self-assigned this Sep 24, 2026
@moshest
moshest marked this pull request as ready for review September 24, 2026 02:32
@moshest
moshest merged commit fa2e7ae into main Sep 24, 2026
4 checks passed
@moshest
moshest deleted the claude/project-thread-ipfobz branch September 24, 2026 02:33
moshest added a commit that referenced this pull request Sep 25, 2026
findMarkdownFiles and readLocalDocsFiles built stored paths with
path.join, which uses backslashes on Windows, so docs added there were
stored as "docs\guide.md". The two repo-meta tests from #125 caught it
once #159 turned on Windows CI, and main's Windows test job was red.

Stored paths are package data, not filesystem paths, so they are now built
with posix.join. Reading files still uses the platform join. This also
means gitignore matching gets forward-slash paths on every platform.

Test (Windows) passes on this PR, along with Linux tests, lint and build.
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.

Three @neuledge/registry tests fail on Windows, blocking windows-latest in CI

2 participants