refactor: improve mocking for GitHubClient and enhance SIGINT handling in tests

This commit is contained in:
gsxdsm
2026-04-01 22:55:16 -07:00
parent dc442cf391
commit 1fa8837c6b
2 changed files with 5 additions and 4 deletions

View File

@@ -1573,7 +1573,7 @@ describe("promptForPort", () => {
vi.mocked(createInterface).mockReturnValue(mockRl as unknown as ReturnType<typeof createInterface>);
// Simulate that the promise rejects when SIGINT is triggered
const removeListenerSpy = vi.spyOn(process, "removeListener").mockImplementation(() => process as unknown as void);
const removeListenerSpy = vi.spyOn(process, "removeListener" as any).mockImplementation(() => process);
// Trigger SIGINT handler immediately to test rejection
let sigintHandler: (() => void) | null = null;