From dbeecb97f9c9dbbaa87e1f4783f988db809c7731 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Thu, 15 Jan 2026 00:47:21 +0000 Subject: [PATCH] fix(test): add timeout and update snapshot for yarn.lock migration tests - Add setDefaultTimeout(5 minutes) to yarn-lock-migration.test.ts to prevent tests from timing out when they need network access - Update snapshot to reflect the new behavior where unresolved required peer dependencies are added to optionalPeers in the lockfile Co-Authored-By: Claude Opus 4.5 --- .../__snapshots__/yarn-lock-migration.test.ts.snap | 3 +++ test/cli/install/migration/yarn-lock-migration.test.ts | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/cli/install/migration/__snapshots__/yarn-lock-migration.test.ts.snap b/test/cli/install/migration/__snapshots__/yarn-lock-migration.test.ts.snap index a125e2f1d0..fc736f69af 100644 --- a/test/cli/install/migration/__snapshots__/yarn-lock-migration.test.ts.snap +++ b/test/cli/install/migration/__snapshots__/yarn-lock-migration.test.ts.snap @@ -288,6 +288,9 @@ exports[`yarn.lock migration basic migration with realistic complex yarn.lock: c "peerDependencies": { "react": ">=16.8.0", }, + "optionalPeers": [ + "react", + ], }, }, "packages": { diff --git a/test/cli/install/migration/yarn-lock-migration.test.ts b/test/cli/install/migration/yarn-lock-migration.test.ts index da3fbd786e..7f7fa175b4 100644 --- a/test/cli/install/migration/yarn-lock-migration.test.ts +++ b/test/cli/install/migration/yarn-lock-migration.test.ts @@ -1,8 +1,12 @@ -import { describe, expect, test } from "bun:test"; +import { beforeAll, describe, expect, setDefaultTimeout, test } from "bun:test"; import fs from "fs"; import { bunEnv, bunExe, tempDirWithFiles } from "harness"; import { join } from "path"; +beforeAll(() => { + setDefaultTimeout(1000 * 60 * 5); +}); + describe("yarn.lock migration basic", () => { test("simple yarn.lock migration produces correct bun.lock", async () => { const tempDir = tempDirWithFiles("yarn-migration-simple", {