mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
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:
@@ -288,6 +288,9 @@ exports[`yarn.lock migration basic migration with realistic complex yarn.lock: c
|
||||
"peerDependencies": {
|
||||
"react": ">=16.8.0",
|
||||
},
|
||||
"optionalPeers": [
|
||||
"react",
|
||||
],
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
|
||||
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user