diff --git a/tests/boundary/filesystem/pluginPackage.test.ts b/tests/boundary/filesystem/pluginPackage.test.ts index a4a6f60c6b8..540f1271d00 100644 --- a/tests/boundary/filesystem/pluginPackage.test.ts +++ b/tests/boundary/filesystem/pluginPackage.test.ts @@ -97,6 +97,14 @@ it("refuses a stale lock before producing a release artifact", () => { ); }); +const xzBinary = (os: string, integrity: string): Record => ({ + version: "2.0.0", + integrity, + os: [os], + cpu: ["x64"], + optional: true, +}); + const platformLock = () => ({ name: "rea-agents", version: "6.8.0", @@ -123,28 +131,13 @@ const platformLock = () => ({ "xz-wasm32": "2.0.0", }, } as Record, - "node_modules/xz-win32-x64": { - version: "2.0.0", - integrity: "win digest", - os: ["win32"], - cpu: ["x64"], - optional: true, - } as Record, + "node_modules/xz-win32-x64": xzBinary("win32", "win digest"), // A development copy of another version is hoisted; the runtime one nests. - "node_modules/xz/node_modules/xz-linux-x64": { - version: "2.0.0", - integrity: "linux digest", - os: ["linux"], - cpu: ["x64"], - optional: true, - } as Record, - "node_modules/xz-freebsd-x64": { - version: "2.0.0", - integrity: "bsd digest", - os: ["freebsd"], - cpu: ["x64"], - optional: true, - } as Record, + "node_modules/xz/node_modules/xz-linux-x64": xzBinary( + "linux", + "linux digest", + ), + "node_modules/xz-freebsd-x64": xzBinary("freebsd", "bsd digest"), "node_modules/xz-wasm32": { version: "2.0.0", integrity: "wasm digest",