Skip to content

Commit

Permalink
Regression test for #11806 (#16392)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfgithub authored Jan 14, 2025
1 parent 5c57930 commit 01c83cd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/regression/issue/11806.test.ts
Original file line number Diff line number Diff line change
@@ -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);
});

0 comments on commit 01c83cd

Please sign in to comment.