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 <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2026-01-15 00:47:21 +00:00
parent 529fda21d2
commit dbeecb97f9
2 changed files with 8 additions and 1 deletions

View File

@@ -288,6 +288,9 @@ exports[`yarn.lock migration basic migration with realistic complex yarn.lock: c
"peerDependencies": {
"react": ">=16.8.0",
},
"optionalPeers": [
"react",
],
},
},
"packages": {

View File

@@ -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", {