Regression test for #11806 (#16392)

This commit is contained in:
pfg
2025-01-14 05:22:15 -08:00
committed by GitHub
parent 5c5793050c
commit 01c83cdcfe

View File

@@ -0,0 +1,38 @@
import { test, expect } from "bun:test";
import { bunExe, tempDirWithFiles } from "harness";
test("11806", () => {
const dir = tempDirWithFiles("11806", {
"package.json": JSON.stringify({
"name": "project",
"workspaces": ["apps/*"],
}),
"apps": {
"api": {
"package.json": JSON.stringify({
"name": "api",
"jest": {
"testRegex": ".*\\.spec\\.ts$",
},
"devDependencies": {
"typescript": "^5.7.3",
},
}),
},
},
});
const result1 = Bun.spawnSync({
cmd: [bunExe(), "install"],
stdio: ["inherit", "inherit", "inherit"],
cwd: dir + "/apps/api",
});
expect(result1.exitCode).toBe(0);
const result2 = Bun.spawnSync({
cmd: [bunExe(), "add", "--dev", "typescript"],
stdio: ["inherit", "inherit", "inherit"],
cwd: dir + "/apps/api",
});
expect(result2.exitCode).toBe(0);
});