Skip to content

fix(executor-e2e): invoke .js test fixture via process.execPath on Windows#1616

Merged
jamesadevine merged 1 commit into
mainfrom
copilot/investigate-test-failure
Jul 21, 2026
Merged

fix(executor-e2e): invoke .js test fixture via process.execPath on Windows#1616
jamesadevine merged 1 commit into
mainfrom
copilot/investigate-test-failure

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Windows has no OS-level shebang support, so spawn('fake-ado-aw.js', args) fires a child error event (ENOENT/ENOEXEC). runner.ts catches the rejection and returns { ok: false }, causing "passes an expected executor rejection without running assertions" to fail with Expected result.ok=true, received false.

Summary

In execute-cli.ts (test-harness only, not shipped in ado-script.zip), resolve .js binaries through process.execPath on Windows before calling spawnCollect:

const [spawnCmd, spawnArgs] =
  process.platform === "win32" && opts.adoAwBin.endsWith(".js")
    ? [process.execPath, [opts.adoAwBin, ...args]]
    : [opts.adoAwBin, args];

The production ado-aw binary is always a native executable — never .js — so the Windows branch is only exercised by test fixtures.

Test plan

  • npx vitest run src/executor-e2e/__tests__/runner.test.ts — 3/3 pass
  • npm test — 565/565 pass
  • npm run typecheck — clean

…ndows

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot AI requested a review from jamesadevine July 21, 2026 16:20
@jamesadevine
jamesadevine marked this pull request as ready for review July 21, 2026 16:24
@jamesadevine
jamesadevine merged commit 5ad7f63 into main Jul 21, 2026
2 of 5 checks passed
@jamesadevine
jamesadevine deleted the copilot/investigate-test-failure branch July 21, 2026 16:25
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