diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-06-26 17:24:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 21:24:10 +0000 |
commit | 0da01c0ca6b537f74be32126e567bdfc2c73ed16 (patch) | |
tree | ef29d32cffb03a975a58c16827b0691dda50a5b3 /tests | |
parent | 86e0292733d6d08bf338b68fd50863aef17b1e44 (diff) |
refactor: move PackageJson to deno_config (#24348)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/lsp_tests.rs | 2 | ||||
-rw-r--r-- | tests/integration/npm_tests.rs | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 0659bb439..c8089a503 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -13006,7 +13006,7 @@ fn lsp_deno_future_env_byonm() { "severity": 1, "code": "resolver-error", "source": "deno", - "message": format!("Could not find a matching package for 'npm:chalk' in '{}'. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.", temp_dir.path().join("package.json")), + "message": "Could not find a matching package for 'npm:chalk' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.", }, ]) ); diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs index 1d60d9e35..871f09d15 100644 --- a/tests/integration/npm_tests.rs +++ b/tests/integration/npm_tests.rs @@ -2255,7 +2255,7 @@ console.log(getKind()); .args("run --allow-read chalk.ts") .run(); output.assert_matches_text( - r#"error: Could not find a matching package for 'npm:chalk@5' in '[WILDCARD]package.json'. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno. + r#"error: Could not find a matching package for 'npm:chalk@5' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno. at file:///[WILDCARD]chalk.ts:1:19 "#); output.assert_exit_code(1); @@ -2340,7 +2340,7 @@ console.log(getKind()); .args("run --allow-read chalk.ts") .run(); output.assert_matches_text( - r#"error: Could not find a matching package for 'npm:chalk@5' in '[WILDCARD]package.json'. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno. + r#"error: Could not find a matching package for 'npm:chalk@5' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno. at file:///[WILDCARD]chalk.ts:1:19 "#); output.assert_exit_code(1); @@ -2545,7 +2545,7 @@ fn byonm_package_npm_specifier_not_installed_and_invalid_subpath() { // no npm install has been run, so this should give an informative error let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text( - r#"error: Could not find '[WILDCARD]package.json'. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`? + r#"error: Could not find "chalk" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`? at file:///[WILDCARD]/main.ts:1:19 "#, ); @@ -2561,8 +2561,8 @@ fn byonm_package_npm_specifier_not_installed_and_invalid_subpath() { let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text( - r#"error: Failed resolving package subpath './test' for '[WILDCARD]package.json' - at file:///[WILDCARD]/main.ts:1:8 + r#"error: [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './test' is not defined by "exports" in '[WILDLINE]package.json' imported from '[WILDLINE]main.ts' + at file:///[WILDLINE]/main.ts:1:8 "#, ); output.assert_exit_code(1); @@ -2589,7 +2589,7 @@ fn future_byonm_package_npm_specifier_not_installed_and_invalid_subpath() { // no npm install has been run, so this should give an informative error let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text( - r#"error: Could not find '[WILDCARD]package.json'. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`? + r#"error: Could not find "chalk" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`? at file:///[WILDCARD]/main.ts:1:19 "#, ); @@ -2605,8 +2605,8 @@ fn future_byonm_package_npm_specifier_not_installed_and_invalid_subpath() { let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text( - r#"error: Failed resolving package subpath './test' for '[WILDCARD]package.json' - at file:///[WILDCARD]/main.ts:1:8 + r#"error: [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './test' is not defined by "exports" in '[WILDLINE]package.json' imported from '[WILDLINE]main.ts' + at file:///[WILDLINE]/main.ts:1:8 "#, ); output.assert_exit_code(1); |