mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
chore: enable lock_deno_json_package_json_deps (#26029)
This commit is contained in:
parent
dd8cbf5e29
commit
f288730c38
1 changed files with 5 additions and 3 deletions
|
@ -926,9 +926,7 @@ fn lock_redirects() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn lock_deno_json_package_json_deps() {
|
fn lock_deno_json_package_json_deps() {
|
||||||
let context = TestContextBuilder::new()
|
let context = TestContextBuilder::new()
|
||||||
.use_temp_cwd()
|
.use_temp_cwd()
|
||||||
|
@ -942,6 +940,7 @@ fn lock_deno_json_package_json_deps() {
|
||||||
|
|
||||||
// add a jsr and npm dependency
|
// add a jsr and npm dependency
|
||||||
deno_json.write_json(&json!({
|
deno_json.write_json(&json!({
|
||||||
|
"nodeModulesDir": "auto",
|
||||||
"imports": {
|
"imports": {
|
||||||
"esm-basic": "npm:@denotest/esm-basic",
|
"esm-basic": "npm:@denotest/esm-basic",
|
||||||
"module_graph": "jsr:@denotest/module-graph@1.4",
|
"module_graph": "jsr:@denotest/module-graph@1.4",
|
||||||
|
@ -984,6 +983,7 @@ fn lock_deno_json_package_json_deps() {
|
||||||
// now remove the npm dependency from the deno.json and move
|
// now remove the npm dependency from the deno.json and move
|
||||||
// it to a package.json that uses an alias
|
// it to a package.json that uses an alias
|
||||||
deno_json.write_json(&json!({
|
deno_json.write_json(&json!({
|
||||||
|
"nodeModulesDir": "auto",
|
||||||
"imports": {
|
"imports": {
|
||||||
"module_graph": "jsr:@denotest/module-graph@1.4",
|
"module_graph": "jsr:@denotest/module-graph@1.4",
|
||||||
}
|
}
|
||||||
|
@ -1060,7 +1060,9 @@ fn lock_deno_json_package_json_deps() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// now remove the deps from the deno.json
|
// now remove the deps from the deno.json
|
||||||
deno_json.write("{}");
|
deno_json.write_json(&json!({
|
||||||
|
"nodeModulesDir": "auto"
|
||||||
|
}));
|
||||||
main_ts.write("");
|
main_ts.write("");
|
||||||
context
|
context
|
||||||
.new_command()
|
.new_command()
|
||||||
|
|
Loading…
Add table
Reference in a new issue