diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/mod.rs | 5 | ||||
-rw-r--r-- | cli/tests/integration/run_tests.rs | 4 | ||||
-rw-r--r-- | cli/tests/integration/watcher_tests.rs | 2 | ||||
-rw-r--r-- | cli/tests/testdata/020_json_modules.ts.out | 3 | ||||
-rw-r--r-- | cli/tests/testdata/checkjs.tsconfig.json (renamed from cli/tests/testdata/038_checkjs.tsconfig.json) | 0 | ||||
-rw-r--r-- | cli/tests/testdata/compiler_api_test.ts | 4 | ||||
-rw-r--r-- | cli/tests/testdata/error_004_missing_module.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/error_005_missing_dynamic_import.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/error_006_import_ext_failure.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/error_013_missing_script.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/error_missing_module_named_import.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/import_assertions/static_error.out | 5 | ||||
-rw-r--r-- | cli/tests/testdata/jsx_import_source_error.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/reference_types_error.js.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/workers/nonexistent_worker.out | 2 |
15 files changed, 18 insertions, 21 deletions
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs index b04f552e8..8dd50b2f3 100644 --- a/cli/tests/integration/mod.rs +++ b/cli/tests/integration/mod.rs @@ -1100,9 +1100,8 @@ fn basic_auth_tokens() { let stderr_str = std::str::from_utf8(&output.stderr).unwrap().trim(); eprintln!("{}", stderr_str); - assert!(stderr_str.contains( - "Import 'http://127.0.0.1:4554/001_hello.js' failed, not found." - )); + assert!(stderr_str + .contains("Module not found \"http://127.0.0.1:4554/001_hello.js\".")); let output = util::deno_cmd() .current_dir(util::root_path()) diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index d36d0de1b..6e4f45338 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -163,7 +163,7 @@ itest!(_035_cached_only_flag { itest!(_038_checkjs { // checking if JS file is run through TS compiler - args: "run --reload --config 038_checkjs.tsconfig.json 038_checkjs.js", + args: "run --reload --config checkjs.tsconfig.json 038_checkjs.js", exit_code: 1, output: "038_checkjs.js.out", }); @@ -1584,7 +1584,7 @@ itest!(worker_close_in_wasm_reactions { }); itest!(reference_types_error { - args: "run reference_types_error.js", + args: "run --config checkjs.tsconfig.json reference_types_error.js", output: "reference_types_error.js.out", exit_code: 1, }); diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs index f0431e301..855538b16 100644 --- a/cli/tests/integration/watcher_tests.rs +++ b/cli/tests/integration/watcher_tests.rs @@ -989,7 +989,7 @@ fn test_watch_module_graph_error_referrer() { assert_contains!(&line1, CLEAR_SCREEN); assert_contains!(&line1, "Process started"); let line2 = stderr_lines.next().unwrap(); - assert_contains!(&line2, "error: Cannot load module"); + assert_contains!(&line2, "error: Module not found"); assert_contains!(&line2, "nonexistent.js"); let line3 = stderr_lines.next().unwrap(); assert_contains!(&line3, " at "); diff --git a/cli/tests/testdata/020_json_modules.ts.out b/cli/tests/testdata/020_json_modules.ts.out index bfb7c80cf..da33c40bf 100644 --- a/cli/tests/testdata/020_json_modules.ts.out +++ b/cli/tests/testdata/020_json_modules.ts.out @@ -1,5 +1,4 @@ [WILDCARD] -error: An unsupported media type was attempted to be imported as a module. +error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import assertion with the type of "json". Specifier: [WILDCARD]/subdir/config.json - MediaType: Json [WILDCARD]
\ No newline at end of file diff --git a/cli/tests/testdata/038_checkjs.tsconfig.json b/cli/tests/testdata/checkjs.tsconfig.json index 46d96db9e..46d96db9e 100644 --- a/cli/tests/testdata/038_checkjs.tsconfig.json +++ b/cli/tests/testdata/checkjs.tsconfig.json diff --git a/cli/tests/testdata/compiler_api_test.ts b/cli/tests/testdata/compiler_api_test.ts index f51b5647c..30fc19d5f 100644 --- a/cli/tests/testdata/compiler_api_test.ts +++ b/cli/tests/testdata/compiler_api_test.ts @@ -514,7 +514,7 @@ Deno.test({ code: 900001, start: null, end: null, - messageText: 'Cannot load module "file:///b.ts".', + messageText: 'Module not found "file:///b.ts".', messageChain: null, source: null, sourceLine: null, @@ -524,7 +524,7 @@ Deno.test({ ]); assert( Deno.formatDiagnostics(diagnostics).includes( - 'Cannot load module "file:///b.ts".', + 'Module not found "file:///b.ts".', ), ); }, diff --git a/cli/tests/testdata/error_004_missing_module.ts.out b/cli/tests/testdata/error_004_missing_module.ts.out index 798ffc007..9a2cfb8a8 100644 --- a/cli/tests/testdata/error_004_missing_module.ts.out +++ b/cli/tests/testdata/error_004_missing_module.ts.out @@ -1,2 +1,2 @@ -[WILDCARD]error: Cannot load module "file:///[WILDCARD]/bad-module.ts". +[WILDCARD]error: Module not found "file:///[WILDCARD]/bad-module.ts". at file:///[WILDCARD]/error_004_missing_module.ts:1:28 diff --git a/cli/tests/testdata/error_005_missing_dynamic_import.ts.out b/cli/tests/testdata/error_005_missing_dynamic_import.ts.out index 0ca35bd3b..55e4a8524 100644 --- a/cli/tests/testdata/error_005_missing_dynamic_import.ts.out +++ b/cli/tests/testdata/error_005_missing_dynamic_import.ts.out @@ -1,4 +1,4 @@ -error: Uncaught (in promise) TypeError: Cannot load module "[WILDCARD]/bad-module.ts". +error: Uncaught (in promise) TypeError: Module not found "[WILDCARD]/bad-module.ts". const _badModule = await import("./bad-module.ts"); ^ at async file://[WILDCARD]/error_005_missing_dynamic_import.ts:2:22 diff --git a/cli/tests/testdata/error_006_import_ext_failure.ts.out b/cli/tests/testdata/error_006_import_ext_failure.ts.out index bffbafc7a..667579bd8 100644 --- a/cli/tests/testdata/error_006_import_ext_failure.ts.out +++ b/cli/tests/testdata/error_006_import_ext_failure.ts.out @@ -1,2 +1,2 @@ -[WILDCARD]error: Cannot load module "[WILDCARD]/non-existent". +[WILDCARD]error: Module not found "[WILDCARD]/non-existent". at file:///[WILDCARD]/error_006_import_ext_failure.ts:1:8 diff --git a/cli/tests/testdata/error_013_missing_script.out b/cli/tests/testdata/error_013_missing_script.out index fdd7aa27e..7ee268de4 100644 --- a/cli/tests/testdata/error_013_missing_script.out +++ b/cli/tests/testdata/error_013_missing_script.out @@ -1 +1 @@ -error: Cannot load module "[WILDCARD]missing_file_name". +error: Module not found "[WILDCARD]missing_file_name". diff --git a/cli/tests/testdata/error_missing_module_named_import.ts.out b/cli/tests/testdata/error_missing_module_named_import.ts.out index d1162ab52..3dccaffb1 100644 --- a/cli/tests/testdata/error_missing_module_named_import.ts.out +++ b/cli/tests/testdata/error_missing_module_named_import.ts.out @@ -1,3 +1,3 @@ [WILDCARD] -error: Cannot load module "file://[WILDCARD]/does_not_exist.js". +error: Module not found "file://[WILDCARD]/does_not_exist.js". at file:///[WILDCARD]/error_missing_module_named_import.ts:[WILDCARD] diff --git a/cli/tests/testdata/import_assertions/static_error.out b/cli/tests/testdata/import_assertions/static_error.out index 8524079de..4efdf8682 100644 --- a/cli/tests/testdata/import_assertions/static_error.out +++ b/cli/tests/testdata/import_assertions/static_error.out @@ -1,5 +1,4 @@ [WILDCARD] -error: An unsupported media type was attempted to be imported as a module. - Specifier: [WILDCARD]data.json - MediaType: Json +error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import assertion with the type of "json". + Specifier: [WILDCARD]/data.json at [WILDCARD]static_error.ts:1:18 diff --git a/cli/tests/testdata/jsx_import_source_error.out b/cli/tests/testdata/jsx_import_source_error.out index b9758a99e..957fa4a97 100644 --- a/cli/tests/testdata/jsx_import_source_error.out +++ b/cli/tests/testdata/jsx_import_source_error.out @@ -1,2 +1,2 @@ -error: Cannot load module "file:///[WILDCARD]/nonexistent/jsx-runtime". +error: Module not found "file:///[WILDCARD]/nonexistent/jsx-runtime". at file:///[WILDCARD]/deno-jsx-error.jsonc:1:1 diff --git a/cli/tests/testdata/reference_types_error.js.out b/cli/tests/testdata/reference_types_error.js.out index 89b450520..ebb9b3a26 100644 --- a/cli/tests/testdata/reference_types_error.js.out +++ b/cli/tests/testdata/reference_types_error.js.out @@ -1,2 +1,2 @@ -error: Cannot load module "file:///[WILDCARD]/nonexistent.d.ts". +error: Module not found "file:///[WILDCARD]/nonexistent.d.ts". at file:///[WILDCARD]/reference_types_error.js:1:23 diff --git a/cli/tests/testdata/workers/nonexistent_worker.out b/cli/tests/testdata/workers/nonexistent_worker.out index 5280e22d1..1b5111b14 100644 --- a/cli/tests/testdata/workers/nonexistent_worker.out +++ b/cli/tests/testdata/workers/nonexistent_worker.out @@ -1,3 +1,3 @@ -[WILDCARD]error: Uncaught (in worker "") Cannot load module "file:///[WILDCARD]/workers/doesnt_exist.js". +[WILDCARD]error: Uncaught (in worker "") Module not found "file:///[WILDCARD]/workers/doesnt_exist.js". error: Uncaught (in promise) Error: Unhandled error event in child worker. at Worker.#pollControl ([WILDCARD]) |