-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wrong project folder detection (#57)
- Loading branch information
1 parent
25124b8
commit 20d5f1e
Showing
2 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import { | |
} from "./test_utils"; | ||
import * as assert from "node:assert/strict"; | ||
import { | ||
exec, | ||
PkgJson, | ||
readJson, | ||
readTextFile, | ||
|
@@ -289,6 +290,23 @@ describe("install", () => { | |
); | ||
}); | ||
|
||
it("pnpm install into existing project", async () => { | ||
await runInTempDir(async (dir) => { | ||
const sub = path.join(dir, "sub", "sub1"); | ||
await fs.promises.mkdir(sub, { | ||
recursive: true, | ||
}); | ||
|
||
await exec("pnpm", ["i", "preact"], dir); | ||
|
||
await runJsr(["i", "--pnpm", "@std/[email protected]"], sub); | ||
assert.ok( | ||
await isFile(path.join(dir, "pnpm-lock.yaml")), | ||
"pnpm lockfile not created", | ||
); | ||
}); | ||
}); | ||
|
||
if (process.platform !== "win32") { | ||
it("jsr add --bun @std/[email protected] - forces bun", async () => { | ||
await withTempEnv( | ||
|