From e18241cb38f21d4bf7e06c44ecd2947f832ee7a8 Mon Sep 17 00:00:00 2001 From: garrytan Date: Tue, 3 Nov 2026 09:16:25 +0000 Subject: [PATCH] test(qa): report-dir accepts Windows' ENOENT for a non-directory .gstack Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- changelog.d/gsta258-l3-windows-subset-reds.md | 1 + test/qa-report-dir.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/gsta258-l3-windows-subset-reds.md diff --git a/changelog.d/gsta258-l3-windows-subset-reds.md b/changelog.d/gsta258-l3-windows-subset-reds.md new file mode 100644 index 000000000..e653ee811 --- /dev/null +++ b/changelog.d/gsta258-l3-windows-subset-reds.md @@ -0,0 +1 @@ +**The Windows-safe test subset is green again on current main.** `test/qa-report-dir.test.ts` expected `ENOTDIR` when `.gstack` is a file, but Windows reports `ENOENT` for the same mistake, so the test failed on every Windows run (windows-free-tests run 41607809007 at f6d6215). The test now accepts either code on Windows and still requires `ENOTDIR` everywhere else. With Windows checks now running by path, a red subset test would block any pull request that touches it. diff --git a/test/qa-report-dir.test.ts b/test/qa-report-dir.test.ts index 97a121703..afc6f600b 100644 --- a/test/qa-report-dir.test.ts +++ b/test/qa-report-dir.test.ts @@ -84,7 +84,7 @@ test('report-dir names the filesystem cause when .gstack is not a directory', () fs.writeFileSync(path.join(f.root, '.gstack'), 'not a directory\n'); const r = f.tool('gstack-qa-evidence', 'report-dir'); expect(r.status).toBe(2); - expect(r.stderr).toContain('report-dir failed: ENOTDIR'); + expect(r.stderr).toMatch(process.platform === 'win32' ? /report-dir failed: (ENOTDIR|ENOENT)/ : /report-dir failed: ENOTDIR/); }); test('report-dir refuses outside a git work tree instead of guessing a location', () => {