diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/bun.lockb | bin | 162926 -> 163311 bytes | |||
-rw-r--r-- | test/cli/install/bun-install.test.ts | 2 | ||||
-rw-r--r-- | test/cli/install/bun-update.test.ts | 7 | ||||
-rw-r--r-- | test/harness.ts | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/test/bun.lockb b/test/bun.lockb Binary files differindex 8abf35b6f..b68c3f550 100755 --- a/test/bun.lockb +++ b/test/bun.lockb diff --git a/test/cli/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts index 354909745..6fb303b5d 100644 --- a/test/cli/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -62,7 +62,7 @@ registry = "http://${server.hostname}:${server.port}/" }); expect(stderr).toBeDefined(); const err = await new Response(stderr).text(); - expect(err.split(/\r?\n/)).toContain("error: ConnectionRefused downloading package manifest bar"); + expect(err).toMatch(/error: (ConnectionRefused|ConnectionClosed) downloading package manifest bar/gm); expect(stdout).toBeDefined(); expect(await new Response(stdout).text()).toBeEmpty(); expect(await exited).toBe(1); diff --git a/test/cli/install/bun-update.test.ts b/test/cli/install/bun-update.test.ts index 8434ca470..c7d4fdd85 100644 --- a/test/cli/install/bun-update.test.ts +++ b/test/cli/install/bun-update.test.ts @@ -314,9 +314,14 @@ it("lockfile should not be modified when there are no version changes, issue#588 }; let prev = await getLockbContent(); - for (let i = 0; i < 5; i++) { + urls.length = 0; + const count = 5; + for (let i = 0; i < count; i++) { const content = await getLockbContent(); expect(prev).toStrictEqual(content); prev = content; } + + // Assert we actually made a request to the registry for each update + expect(urls).toHaveLength(count); }); diff --git a/test/harness.ts b/test/harness.ts index f6c0f0e98..16d04c1b4 100644 --- a/test/harness.ts +++ b/test/harness.ts @@ -7,6 +7,7 @@ export const bunEnv: any = { NO_COLOR: "1", FORCE_COLOR: undefined, TZ: "Etc/UTC", + CI: "1", }; export function bunExe() { |