Skip to content

Commit d1c1962

Browse files
committed
fix(cli): bump timeout on loader migration happy-path tests
The two happy-path tests in loader.test.ts fall through to loadMigrationModule, which performs a real `npm install @fern-api/generator-migrations@latest`. That call is network-bound and regularly exceeds the 5s vitest default on CI, producing a flaky timeout (observed 2s–8s locally). Made-with: Cursor
1 parent 0cf10c3 commit d1c1962

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • packages/cli/cli/src/commands/upgrade/migrations/__test__

packages/cli/cli/src/commands/upgrade/migrations/__test__/loader.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ describe("loadAndRunMigrations", () => {
434434
).rejects.toThrow("Invalid generator configuration");
435435
});
436436

437+
// Timeout bumped to 60s because these two happy-path tests fall through
438+
// to loadMigrationModule, which performs a real `npm install
439+
// @fern-api/generator-migrations@latest`. That call is network-bound and
440+
// regularly exceeds the 5s vitest default on CI (observed 2s–5s+).
437441
it("should accept valid config with name property", async () => {
438442
const mockLogger = {
439443
debug: vi.fn(),
@@ -456,7 +460,7 @@ describe("loadAndRunMigrations", () => {
456460
expect(mockLogger.warn).not.toHaveBeenCalledWith(
457461
expect.stringContaining("Invalid generator configuration structure")
458462
);
459-
});
463+
}, 60000);
460464

461465
it("should accept config with additional properties", async () => {
462466
const mockLogger = {
@@ -483,6 +487,6 @@ describe("loadAndRunMigrations", () => {
483487
expect(mockLogger.warn).not.toHaveBeenCalledWith(
484488
expect.stringContaining("Invalid generator configuration structure")
485489
);
486-
});
490+
}, 60000);
487491
});
488492
});

0 commit comments

Comments
 (0)