aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/install/bun-install.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/install/bun-install.test.ts')
-rw-r--r--test/bun.js/install/bun-install.test.ts21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/bun.js/install/bun-install.test.ts b/test/bun.js/install/bun-install.test.ts
index cdad571fc..c183ca6bf 100644
--- a/test/bun.js/install/bun-install.test.ts
+++ b/test/bun.js/install/bun-install.test.ts
@@ -1218,8 +1218,10 @@ it("should handle GitHub URL in dependencies (user/repo)", async () => {
const err = await new Response(stderr).text();
expect(err).toContain("Saved lockfile");
expect(stdout).toBeDefined();
- const out = await new Response(stdout).text();
- expect(out.replace(/\s*\[[0-9\.]+ms\]\s*$/, "").split(/\r?\n/)).toEqual([
+ let out = await new Response(stdout).text();
+ out = out.replace(/\s*\[[0-9\.]+ms\]\s*$/, "");
+ out = out.replace(/(github:[^#]+)#[a-f0-9]+/, "$1");
+ expect(out.split(/\r?\n/)).toEqual([
" + uglify@github:mishoo/UglifyJS",
"",
" 1 packages installed",
@@ -1236,6 +1238,7 @@ it("should handle GitHub URL in dependencies (user/repo)", async () => {
"uglifyjs",
]);
expect(await readdirSorted(join(package_dir, "node_modules", "uglify"))).toEqual([
+ ".bun-tag",
".gitattributes",
".github",
".gitignore",
@@ -1306,6 +1309,7 @@ it("should handle GitHub URL in dependencies (user/repo#commit-id)", async () =>
join(package_dir, "node_modules", ".cache", "@GH@mishoo-UglifyJS-e219a9a"),
);
expect(await readdirSorted(join(package_dir, "node_modules", "uglify"))).toEqual([
+ ".bun-tag",
".gitattributes",
".github",
".gitignore",
@@ -1351,7 +1355,7 @@ it("should handle GitHub URL in dependencies (user/repo#tag)", async () => {
expect(stdout).toBeDefined();
const out = await new Response(stdout).text();
expect(out.replace(/\s*\[[0-9\.]+ms\]\s*$/, "").split(/\r?\n/)).toEqual([
- " + uglify@github:mishoo/UglifyJS#v3.14.1",
+ " + uglify@github:mishoo/UglifyJS#e219a9a",
"",
" 1 packages installed",
]);
@@ -1377,6 +1381,7 @@ it("should handle GitHub URL in dependencies (user/repo#tag)", async () => {
join(package_dir, "node_modules", ".cache", "@GH@mishoo-UglifyJS-e219a9a"),
);
expect(await readdirSorted(join(package_dir, "node_modules", "uglify"))).toEqual([
+ ".bun-tag",
".gitattributes",
".github",
".gitignore",
@@ -1422,7 +1427,7 @@ it("should handle GitHub URL in dependencies (github:user/repo#tag)", async () =
expect(stdout).toBeDefined();
const out = await new Response(stdout).text();
expect(out.replace(/\s*\[[0-9\.]+ms\]\s*$/, "").split(/\r?\n/)).toEqual([
- " + uglify@github:mishoo/UglifyJS#v3.14.1",
+ " + uglify@github:mishoo/UglifyJS#e219a9a",
"",
" 1 packages installed",
]);
@@ -1448,6 +1453,7 @@ it("should handle GitHub URL in dependencies (github:user/repo#tag)", async () =
join(package_dir, "node_modules", ".cache", "@GH@mishoo-UglifyJS-e219a9a"),
);
expect(await readdirSorted(join(package_dir, "node_modules", "uglify"))).toEqual([
+ ".bun-tag",
".gitattributes",
".github",
".gitignore",
@@ -1491,8 +1497,10 @@ it("should handle GitHub URL in dependencies (https://github.com/user/repo.git)"
const err = await new Response(stderr).text();
expect(err).toContain("Saved lockfile");
expect(stdout).toBeDefined();
- const out = await new Response(stdout).text();
- expect(out.replace(/\s*\[[0-9\.]+ms\]\s*$/, "").split(/\r?\n/)).toEqual([
+ let out = await new Response(stdout).text();
+ out = out.replace(/\s*\[[0-9\.]+ms\]\s*$/, "");
+ out = out.replace(/(github:[^#]+)#[a-f0-9]+/, "$1");
+ expect(out.split(/\r?\n/)).toEqual([
" + uglify@github:mishoo/UglifyJS",
"",
" 1 packages installed",
@@ -1509,6 +1517,7 @@ it("should handle GitHub URL in dependencies (https://github.com/user/repo.git)"
"uglifyjs",
]);
expect(await readdirSorted(join(package_dir, "node_modules", "uglify"))).toEqual([
+ ".bun-tag",
".gitattributes",
".github",
".gitignore",