31 lines
772 B
TypeScript
31 lines
772 B
TypeScript
import { afterAll, beforeAll, test } from "bun:test";
|
|
import { VerdaccioRegistry, bunEnv, runBunInstall } from "harness";
|
|
|
|
const registry = new VerdaccioRegistry();
|
|
|
|
beforeAll(async () => {
|
|
await registry.start();
|
|
});
|
|
|
|
afterAll(() => {
|
|
registry.stop();
|
|
});
|
|
|
|
test("should handle resolving optional peer from multiple instances of same package", async () => {
|
|
const { packageDir } = await registry.createTestDir({
|
|
files: {
|
|
"package.json": JSON.stringify({
|
|
name: "pkg",
|
|
dependencies: {
|
|
"dep-1": "npm:[email protected]",
|
|
"dep-2": "npm:[email protected]",
|
|
"one-dep": "1.0.0",
|
|
},
|
|
}),
|
|
},
|
|
});
|
|
|
|
// this shouldn't hit an assertion
|
|
await runBunInstall(bunEnv, packageDir);
|
|
});
|