Repository navigation
test(doctor): use native temp paths in Copilot fixtures - #1491
Conversation
|
No findings in the specified diff. The changes are test-only: they replace hard-coded POSIX fixture paths with Review was read-only; I did not run, build, or install anything. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Approving at 276081b. The two Copilot fixtures now build their paths with path.join(os.tmpdir(), …), so on Windows they match the native path the resolver returns for COPILOT_HOME. It is test-only and changes no runtime behaviour, and CI passes on every OS at this head. On a merge with main after #1474, which also changes doctor.test.ts, the file passes 72/72.
The Copilot doctor fixtures build their paths with path.join(os.tmpdir(), ...), so on Windows they match the native path the resolver returns for COPILOT_HOME.
Summary
Fix the two existing Windows failures in
doctor.test.tscaused by Copilot fixtures hard-coding POSIX/tmp/...paths.The tests are path-sensitive: on Windows, the production path resolver normalizes
COPILOT_HOMEto a native path while the mock setup still compares it with the POSIX fixture path. This made the tests report:COPILOT_HOMEas missing;.github/hookswas configured.This change uses
os.tmpdir()andpath.join()for the affected fixtures. It is test-only and does not change Copilot runtime behavior.Validation
npx vitest run src/__tests__/doctor.test.ts: 69 passednpm run lint: passednpm run typecheck: passednpm run build: passedgit diff --check: passedRefs #1474