diff options
author | 2023-10-12 15:17:03 -0700 | |
---|---|---|
committer | 2023-10-12 15:17:03 -0700 | |
commit | 892593c73b93bd5c0d4a9211c08646729f22f034 (patch) | |
tree | aa2547daeb66c5d9e7a80358e4ce2d7192017aaf | |
parent | 691cf338c2a88fd2629f50934fe35fcb5bd08ae2 (diff) | |
download | bun-892593c73b93bd5c0d4a9211c08646729f22f034.tar.gz bun-892593c73b93bd5c0d4a9211c08646729f22f034.tar.zst bun-892593c73b93bd5c0d4a9211c08646729f22f034.zip |
fix install test
-rw-r--r-- | test/cli/install/bun-install.test.ts | 14 | ||||
-rw-r--r-- | test/cli/install/loader-runner-4.3.0.tgz | bin | 0 -> 200 bytes |
2 files changed, 8 insertions, 6 deletions
diff --git a/test/cli/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts index bbe315244..b8908a72d 100644 --- a/test/cli/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -3484,7 +3484,11 @@ it("should handle GitHub tarball URL in dependencies (https://github.com/user/re it("should treat non-GitHub http(s) URLs as tarballs (https://some.url/path?stuff)", async () => { const urls: string[] = []; - setHandler(dummyRegistry(urls)); + setHandler( + dummyRegistry(urls, { + "4.3.0": { as: "4.3.0" }, + }), + ); await writeFile( join(package_dir, "package.json"), JSON.stringify({ @@ -3514,11 +3518,11 @@ it("should treat non-GitHub http(s) URLs as tarballs (https://some.url/path?stuf expect(out.split(/\r?\n/)).toEqual([ " + @vercel/turbopack-node@https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230922.2", "", - " 1 package installed", + " 2 packages installed", ]); expect(await exited).toBe(0); - expect(urls.sort()).toBeEmpty(); - expect(requested).toBe(0); + expect(urls.sort()).toHaveLength(2); + expect(requested).toBe(2); expect(await readdirSorted(join(package_dir, "node_modules"))).toEqual([".cache", "@vercel", "loader-runner"]); expect(await readdirSorted(join(package_dir, "node_modules", "@vercel"))).toEqual(["turbopack-node"]); expect(await readdirSorted(join(package_dir, "node_modules", "@vercel", "turbopack-node"))).toEqual([ @@ -3526,8 +3530,6 @@ it("should treat non-GitHub http(s) URLs as tarballs (https://some.url/path?stuf "src", "tsconfig.json", ]); - const package_json = await file(join(package_dir, "node_modules", "when", "package.json")).json(); - expect(package_json.name).toBe("when"); await access(join(package_dir, "bun.lockb")); }); diff --git a/test/cli/install/loader-runner-4.3.0.tgz b/test/cli/install/loader-runner-4.3.0.tgz Binary files differnew file mode 100644 index 000000000..e6a58fb34 --- /dev/null +++ b/test/cli/install/loader-runner-4.3.0.tgz |