From 190ab0d4f62a275b327b429116bf10ff3ef599a7 Mon Sep 17 00:00:00 2001 From: luyua9 Date: Tue, 15 Sep 2026 19:50:04 +0800 Subject: [PATCH] test(cursor-hook): accept either quote style in the -s KILL assertions CI runs prettier before vitest, which normalizes the wrapped spawnSync arguments to single quotes; the double-quoted substring assertions then fail on all platforms. Match both quote styles instead. --- gitnexus/test/unit/cursor-hook.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitnexus/test/unit/cursor-hook.test.ts b/gitnexus/test/unit/cursor-hook.test.ts index 9e875cb3f..88b241a8a 100644 --- a/gitnexus/test/unit/cursor-hook.test.ts +++ b/gitnexus/test/unit/cursor-hook.test.ts @@ -470,8 +470,8 @@ describe('Cursor hook npx fallback host budget', () => { expect(fnBody).toContain('timeout: npxTimeout'); expect(fnBody).not.toMatch(/timeout:\s*timeout\s*\+\s*5000/); // npx grandchild is killed outright so it cannot keep the DB lock - expect(fnBody).toContain('"-s"'); - expect(fnBody).toContain('KILL'); + expect(fnBody).toMatch(/['"]-s['"]/); + expect(fnBody).toMatch(/['"]KILL['"]/); }); it('reads the shipped timeout value, not a detached literal', () => {