fix: make Windows unit and integration test suites pass under test:pr #342
main fromrefs/pull/342/head·merged by LadyBluenotes(GitHub profile, opens in a new tab) 🎯 Changes#
- In
withNativeCompiler(packages/intent/src/validate/blocks.ts),typescript/unstable/async'sClient.connectViaSpawnspawnstsgowithout acwdoption (inheriting the parent'sprocess.cwd()) while passing--cwd <root>on the command line, andapi.close()closesstdinwithout waiting for the child process to exit. Temporarily switchingprocess.cwd()todirname(root)across the initialapi.updateSnapshotcall keepstsgofrom holding an OS directory handle onrooton Windows so callers canrmSync(root)immediately afterapi.close(). - In
packages/intent/vitest.config.ts, setGIT_CEILING_DIRECTORIEStotmpdir()(so non-git temp fixtures do not walk up into an ancestor.gitdirectory duringgit apply),TERM: 'xterm-256color'(so@clack/promptsenables Unicode symbols before module-load evaluation on Windows), and prependC:\Program Files\Git\bintoPATHwhen present on Windows (sobashresolves to Git Bash rather than WSLC:\Windows\System32\bash.exe). - In
reusable-workflows.test.tsandreview-workflow.test.ts, joinPATHentries withpath.delimiter, use#!/usr/bin/env nodeinstead of#!${process.execPath}(which contains spaces and backslashes on Windows), and passpathToFileURL(preload).hreftonode --import. - In
tests/integration/scaffold.ts, spawnprocess.execPathwithnode_modules/verdaccio/bin/verdacciodirectly instead ofcmd.exe /c verdaccio(shell: true) soregistry.stop()terminates the Verdaccio Node process directly and awaits'close'before removingstorageDir. RaisebeforeAlltimeout inload-integration.test.tsandscanner-integration.test.tsto60_000ms to match the test cases, and useexecSyncfornpm packinpacked-release.test.ts. - Adds a patch changeset.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm run test:pr(runpnpm build:allfirst).
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
- 1
Note
Currently processing new changes in this PR. This may take a few minutes, please wait...
⚙️ Run configuration
-
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
be950b40-d7ae-4dae-8be9-b1d4ac9fd339
📥 Commits
-
Reviewing files that changed from the base of the PR and between 1ff7b0f87a1c4db006eed10742e56cc60b517c1a and bfd25ea0236b2d8fe368ff8c3978797a7a838b59.
📒 Files selected for processing: 9
-
.changeset/windows-tsgo-close-wait.mdpackages/intent/src/validate/blocks.tspackages/intent/tests/integration/load-integration.test.tspackages/intent/tests/integration/packed-release.test.tspackages/intent/tests/integration/scaffold.tspackages/intent/tests/integration/scanner-integration.test.tspackages/intent/tests/reusable-workflows.test.tspackages/intent/tests/review-workflow.test.tspackages/intent/vitest.config.ts
+------------------------------------------+ | Your favorite GPT-wrapped code reviewer. | +------------------------------------------+ \ \ /)/) ( '') / | o(___)✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment `@coderabbitai help` to get the list of available commands.-
View your CI Pipeline Execution ↗ for commit bfd25ea0236b2d8fe368ff8c3978797a7a838b59
Command Status Duration Result nx affected --targets=test:eslint,test:sherif,t...✅ Succeeded 1m 2s View ↗ nx run-many --targets=build✅ Succeeded 1s View ↗
☁️ Nx Cloud last updated this comment at
2026-10-19 01:16:23UTCMerging this PR will not alter performance#
:warning: 7 benchmarks spent significant time in system calls
System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.
:information_source: 7 benchmarks have no flame graph
The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.
✅ 12untouched benchmarks
Comparingfix/windows-test-pr(d882106) withmain(1ff7b0f)
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: d882106be6bd20c71b6ad2f3c105ceb4f5ad42f3
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR