-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(node): pin npm version to 8.5.2 in integration test (#2000)
- Loading branch information
Showing
1 changed file
with
12 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,26 +18,22 @@ Deno.test("integration test of compat mode", { | |
const expressPath = join(tempDir, "node_modules", "express"); | ||
|
||
await t.step("yarn add npm express", async () => { | ||
await exec(`deno run --compat --unstable -A ${yarnUrl} add npm`, opts); | ||
const stat = await Deno.lstat(join(npmPath, "package.json")); | ||
assert(stat.isFile); | ||
// FIXME(kt3k): [email protected] doesn't work with compat mode | ||
await exec( | ||
`deno run --compat --unstable -A ${yarnUrl} add [email protected]`, | ||
opts, | ||
); | ||
assert((await Deno.lstat(join(npmPath, "package.json"))).isFile); | ||
await exec(`deno run --compat --unstable -A ${yarnUrl} add express`, opts); | ||
assert((await Deno.lstat(join(expressPath, "package.json"))).isFile); | ||
}); | ||
|
||
// FIXME(kt3k): npm in compat mode is broken in Linux and Mac | ||
if (Deno.build.os === "windows") { | ||
await t.step("npm install gulp", async () => { | ||
await exec( | ||
`deno run --compat --unstable -A ${ | ||
join(npmPath, "index.js") | ||
} install gulp`, | ||
opts, | ||
); | ||
const stat = await Deno.lstat(join(gulpPath, "package.json")); | ||
assert(stat.isFile); | ||
}); | ||
} | ||
await t.step("npm install gulp", async () => { | ||
const npmCli = join(npmPath, "index.js"); | ||
await exec(`deno run --compat --unstable -A ${npmCli} install gulp`, opts); | ||
const stat = await Deno.lstat(join(gulpPath, "package.json")); | ||
assert(stat.isFile); | ||
}); | ||
|
||
await t.step("run express example app", async () => { | ||
await Deno.writeTextFile( | ||
|