diff options
Diffstat (limited to 'cli')
52 files changed, 66 insertions, 61 deletions
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index 95d214429..9b757bf55 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -105,7 +105,7 @@ fn standalone_error() { let stderr = output.stderr(); // On Windows, we cannot assert the file path (because '\'). // Instead we just check for relevant output. - assert_contains!(stderr, "error: Uncaught Error: boom!"); + assert_contains!(stderr, "error: Uncaught (in promise) Error: boom!"); assert_contains!(stderr, "throw new Error(\"boom!\");"); assert_contains!(stderr, "\n at boom (file://"); assert_contains!(stderr, "standalone_error.ts:2:9"); @@ -145,7 +145,7 @@ fn standalone_error_module_with_imports() { let stderr = output.stderr(); // On Windows, we cannot assert the file path (because '\'). // Instead we just check for relevant output. - assert_contains!(stderr, "error: Uncaught Error: boom!"); + assert_contains!(stderr, "error: Uncaught (in promise) Error: boom!"); assert_contains!(stderr, "throw new Error(\"boom!\");"); assert_contains!(stderr, "\n at file://"); assert_contains!(stderr, "standalone_error_module_with_imports_2.ts:2:7"); diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 6c208ac2c..0ad271426 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -825,7 +825,7 @@ fn repl_reject() { console.write_line(r#"Promise.reject(new Error("foo"));"#); console.expect("Promise {"); console.expect(" <rejected> Error: foo"); - console.expect("Uncaught (in promise) Error: foo"); + console.expect("Uncaught Error: foo"); console.expect(" at <anonymous>"); console.write_line("console.log(2);"); console.expect("2"); @@ -857,7 +857,7 @@ fn repl_error_undefined() { console.expect("Uncaught undefined"); console.write_line(r#"Promise.reject();"#); console.expect("Promise { <rejected> undefined }"); - console.expect("Uncaught (in promise) undefined"); + console.expect("Uncaught undefined"); console.write_line(r#"reportError(undefined);"#); console.expect("undefined"); console.expect("Uncaught undefined"); diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 2e950a0f8..b3bd98098 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3926,7 +3926,7 @@ async fn test_resolve_dns() { let out = String::from_utf8_lossy(&output.stdout); assert!(!output.status.success()); assert!(err.starts_with("Check file")); - assert!(err.contains(r#"error: Uncaught PermissionDenied: Requires net access to "127.0.0.1:4553""#)); + assert!(err.contains(r#"error: Uncaught (in promise) PermissionDenied: Requires net access to "127.0.0.1:4553""#)); assert!(out.is_empty()); } @@ -3947,7 +3947,7 @@ async fn test_resolve_dns() { let out = String::from_utf8_lossy(&output.stdout); assert!(!output.status.success()); assert!(err.starts_with("Check file")); - assert!(err.contains(r#"error: Uncaught PermissionDenied: Requires net access to "127.0.0.1:4553""#)); + assert!(err.contains(r#"error: Uncaught (in promise) PermissionDenied: Requires net access to "127.0.0.1:4553""#)); assert!(out.is_empty()); } @@ -4067,7 +4067,7 @@ fn broken_stdout() { assert!(!output.status.success()); let stderr = std::str::from_utf8(output.stderr.as_ref()).unwrap().trim(); - assert!(stderr.contains("Uncaught BrokenPipe")); + assert!(stderr.contains("Uncaught (in promise) BrokenPipe")); assert!(!stderr.contains("panic")); } diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs index a690db846..f90db6f49 100644 --- a/cli/tests/integration/watcher_tests.rs +++ b/cli/tests/integration/watcher_tests.rs @@ -967,7 +967,11 @@ async fn run_watch_error_messages() { let (_, mut stderr_lines) = child_lines(&mut child); wait_contains("Process started", &mut stderr_lines).await; - wait_contains("error: Uncaught SyntaxError: outer", &mut stderr_lines).await; + wait_contains( + "error: Uncaught (in promise) SyntaxError: outer", + &mut stderr_lines, + ) + .await; wait_contains("Caused by: TypeError: inner", &mut stderr_lines).await; wait_contains("Process failed", &mut stderr_lines).await; diff --git a/cli/tests/testdata/bench/no_check.out b/cli/tests/testdata/bench/no_check.out index 9548a4f3d..6dc016458 100644 --- a/cli/tests/testdata/bench/no_check.out +++ b/cli/tests/testdata/bench/no_check.out @@ -1,4 +1,4 @@ -error: TypeError: Cannot read properties of undefined (reading 'fn') +error: (in promise) TypeError: Cannot read properties of undefined (reading 'fn') Deno.bench(); ^ at [WILDCARD] diff --git a/cli/tests/testdata/error_cause_recursive_aggregate.ts.out b/cli/tests/testdata/error_cause_recursive_aggregate.ts.out index 652403e4a..4ae20055a 100644 --- a/cli/tests/testdata/error_cause_recursive_aggregate.ts.out +++ b/cli/tests/testdata/error_cause_recursive_aggregate.ts.out @@ -1,4 +1,4 @@ -error: Uncaught AggregateError +error: Uncaught (in promise) AggregateError Error: bar <ref *1> at file:///[WILDCARD]/error_cause_recursive_aggregate.ts:2:13 Caused by: Error: foo diff --git a/cli/tests/testdata/error_cause_recursive_tail.ts.out b/cli/tests/testdata/error_cause_recursive_tail.ts.out index e19fa39bc..04b15e91a 100644 --- a/cli/tests/testdata/error_cause_recursive_tail.ts.out +++ b/cli/tests/testdata/error_cause_recursive_tail.ts.out @@ -1,4 +1,4 @@ -error: Uncaught Error: baz +error: Uncaught (in promise) Error: baz const baz = new Error("baz", { cause: bar }); ^ at file:///[WILDCARD]/error_cause_recursive_tail.ts:3:13 diff --git a/cli/tests/testdata/node/require_esm_error/main.out b/cli/tests/testdata/node/require_esm_error/main.out index c7b355411..3db23ff24 100644 --- a/cli/tests/testdata/node/require_esm_error/main.out +++ b/cli/tests/testdata/node/require_esm_error/main.out @@ -1,3 +1,3 @@ -error: Uncaught Error: require() of ES Module [WILDCARD]esm.js from [WILDCARD]main.ts not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. +error: Uncaught (in promise) Error: require() of ES Module [WILDCARD]esm.js from [WILDCARD]main.ts not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. at [WILDCARD] at file:///[WILDCARD]/require_esm_error/main.ts:5:1 diff --git a/cli/tests/testdata/npm/cjs_require_esm_error/main.out b/cli/tests/testdata/npm/cjs_require_esm_error/main.out index 5c735b3a6..f24675de9 100644 --- a/cli/tests/testdata/npm/cjs_require_esm_error/main.out +++ b/cli/tests/testdata/npm/cjs_require_esm_error/main.out @@ -1,2 +1,2 @@ -error: Uncaught Error: require() of ES Module [WILDCARD]my_esm_module.js from [WILDCARD]index.js not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. +error: Uncaught (in promise) Error: require() of ES Module [WILDCARD]my_esm_module.js from [WILDCARD]index.js not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. [WILDCARD] diff --git a/cli/tests/testdata/npm/cjs_require_esm_mjs_error/main.out b/cli/tests/testdata/npm/cjs_require_esm_mjs_error/main.out index e6a8abe27..e779cfaf8 100644 --- a/cli/tests/testdata/npm/cjs_require_esm_mjs_error/main.out +++ b/cli/tests/testdata/npm/cjs_require_esm_mjs_error/main.out @@ -1,2 +1,2 @@ -error: Uncaught Error: require() of ES Module [WILDCARD]esm_mjs.mjs from [WILDCARD]require_mjs.js not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. +error: Uncaught (in promise) Error: require() of ES Module [WILDCARD]esm_mjs.mjs from [WILDCARD]require_mjs.js not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. [WILDCARD] diff --git a/cli/tests/testdata/npm/cjs_this_in_exports/main.out b/cli/tests/testdata/npm/cjs_this_in_exports/main.out index 653a62335..ba436bddc 100644 --- a/cli/tests/testdata/npm/cjs_this_in_exports/main.out +++ b/cli/tests/testdata/npm/cjs_this_in_exports/main.out @@ -1,5 +1,5 @@ 1 1 -error: Uncaught TypeError: this.otherMethod is not a function +error: Uncaught (in promise) TypeError: this.otherMethod is not a function at getValue (file://[WILDCARD]/@denotest/cjs-this-in-exports/1.0.0/index.js:3:17) at file://[WILDCARD]/testdata/npm/cjs_this_in_exports/main.js:11:1 diff --git a/cli/tests/testdata/run/059_fs_relative_path_perm.ts.out b/cli/tests/testdata/run/059_fs_relative_path_perm.ts.out index b55412137..b23628cd6 100644 --- a/cli/tests/testdata/run/059_fs_relative_path_perm.ts.out +++ b/cli/tests/testdata/run/059_fs_relative_path_perm.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught PermissionDenied: Requires read access to "non-existent", run again with the --allow-read flag +[WILDCARD]error: Uncaught (in promise) PermissionDenied: Requires read access to "non-existent", run again with the --allow-read flag Deno.readFileSync("non-existent"); ^ at [WILDCARD] diff --git a/cli/tests/testdata/run/077_fetch_empty.ts.out b/cli/tests/testdata/run/077_fetch_empty.ts.out index 797574350..f11e0f563 100644 --- a/cli/tests/testdata/run/077_fetch_empty.ts.out +++ b/cli/tests/testdata/run/077_fetch_empty.ts.out @@ -1,2 +1,2 @@ -[WILDCARD]error: Uncaught TypeError: Invalid URL: '' +[WILDCARD]error: Uncaught (in promise) TypeError: Invalid URL: '' [WILDCARD] diff --git a/cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out b/cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out index 751b7c971..b6715c749 100644 --- a/cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out +++ b/cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out @@ -1,2 +1,2 @@ -[WILDCARD]error: Uncaught Error: foo +[WILDCARD]error: Uncaught (in promise) Error: foo [WILDCARD] diff --git a/cli/tests/testdata/run/aggregate_error.out b/cli/tests/testdata/run/aggregate_error.out index 7d0c09c70..59c0fb2a5 100644 --- a/cli/tests/testdata/run/aggregate_error.out +++ b/cli/tests/testdata/run/aggregate_error.out @@ -8,7 +8,7 @@ AggregateError: Multiple errors. at [WILDCARD]/aggregate_error.ts:3:3 at [WILDCARD]/aggregate_error.ts:1:24 -error: Uncaught AggregateError: Multiple errors. +error: Uncaught (in promise) AggregateError: Multiple errors. Error: Error message 1. at [WILDCARD]/aggregate_error.ts:2:3 Error: Error message 2. diff --git a/cli/tests/testdata/run/complex_error.ts.out b/cli/tests/testdata/run/complex_error.ts.out index eef1b7699..3c3c26eaf 100644 --- a/cli/tests/testdata/run/complex_error.ts.out +++ b/cli/tests/testdata/run/complex_error.ts.out @@ -16,7 +16,7 @@ AggregateError: foo1 Caused by AggregateError: foo2 at [WILDCARD]/complex_error.ts:8:12 -error: Uncaught AggregateError: foo1 +error: Uncaught (in promise) AggregateError: foo1 AggregateError Error: qux1 at [WILDCARD]/complex_error.ts:3:25 diff --git a/cli/tests/testdata/run/dom_exception_formatting.ts.out b/cli/tests/testdata/run/dom_exception_formatting.ts.out index bcdd714ea..75615d0a8 100644 --- a/cli/tests/testdata/run/dom_exception_formatting.ts.out +++ b/cli/tests/testdata/run/dom_exception_formatting.ts.out @@ -1,3 +1,3 @@ -[WILDCARD]error: Uncaught SyntaxError: foo +[WILDCARD]error: Uncaught (in promise) SyntaxError: foo [WILDCARD] at file:///[WILDCARD]/dom_exception_formatting.ts:[WILDCARD] diff --git a/cli/tests/testdata/run/error_001.ts.out b/cli/tests/testdata/run/error_001.ts.out index 25664a9a4..9d8559917 100644 --- a/cli/tests/testdata/run/error_001.ts.out +++ b/cli/tests/testdata/run/error_001.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught Error: bad +[WILDCARD]error: Uncaught (in promise) Error: bad throw Error("bad"); ^ at foo ([WILDCARD]/error_001.ts:2:9) diff --git a/cli/tests/testdata/run/error_002.ts.out b/cli/tests/testdata/run/error_002.ts.out index 96b9e602a..9fec5d968 100644 --- a/cli/tests/testdata/run/error_002.ts.out +++ b/cli/tests/testdata/run/error_002.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught Error: exception from mod1 +[WILDCARD]error: Uncaught (in promise) Error: exception from mod1 throw Error("exception from mod1"); ^ at throwsError ([WILDCARD]/subdir/mod1.ts:16:9) diff --git a/cli/tests/testdata/run/error_007_any.ts.out b/cli/tests/testdata/run/error_007_any.ts.out index b93ceb1d0..8d13dadb9 100644 --- a/cli/tests/testdata/run/error_007_any.ts.out +++ b/cli/tests/testdata/run/error_007_any.ts.out @@ -1 +1 @@ -[WILDCARD]error: Uncaught { foo: "bar" } +[WILDCARD]error: Uncaught (in promise) { foo: "bar" } diff --git a/cli/tests/testdata/run/error_008_checkjs.js.out b/cli/tests/testdata/run/error_008_checkjs.js.out index e43187382..bab481422 100644 --- a/cli/tests/testdata/run/error_008_checkjs.js.out +++ b/cli/tests/testdata/run/error_008_checkjs.js.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught ReferenceError: consol is not defined +[WILDCARD]error: Uncaught (in promise) ReferenceError: consol is not defined consol.log("hello world!"); ^ at [WILDCARD]/error_008_checkjs.js:2:1 diff --git a/cli/tests/testdata/run/error_009_extensions_error.js.out b/cli/tests/testdata/run/error_009_extensions_error.js.out index ec286a60a..0fd1306de 100644 --- a/cli/tests/testdata/run/error_009_extensions_error.js.out +++ b/cli/tests/testdata/run/error_009_extensions_error.js.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught TypeError: Failed to construct 'Event': 1 argument required, but only 0 present. +[WILDCARD]error: Uncaught (in promise) TypeError: Failed to construct 'Event': 1 argument required, but only 0 present. new Event(); ^ at [WILDCARD] diff --git a/cli/tests/testdata/run/error_018_hide_long_source_js.js.out b/cli/tests/testdata/run/error_018_hide_long_source_js.js.out index cc98669a7..0897a100c 100644 --- a/cli/tests/testdata/run/error_018_hide_long_source_js.js.out +++ b/cli/tests/testdata/run/error_018_hide_long_source_js.js.out @@ -1,2 +1,2 @@ -error: Uncaught TypeError: Cannot read properties of undefined (reading 'a') +error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'a') at file:///[WILDCARD]/error_018_hide_long_source_js.js:3:206 diff --git a/cli/tests/testdata/run/error_019_stack_function.ts.out b/cli/tests/testdata/run/error_019_stack_function.ts.out index 03967d12b..edaff27c0 100644 --- a/cli/tests/testdata/run/error_019_stack_function.ts.out +++ b/cli/tests/testdata/run/error_019_stack_function.ts.out @@ -1,7 +1,7 @@ [WILDCARD]Error: function at foo ([WILDCARD]/error_019_stack_function.ts:[WILDCARD]) at [WILDCARD]/error_019_stack_function.ts:[WILDCARD] -error: Uncaught Error: function +error: Uncaught (in promise) Error: function throw new Error("function"); ^ at foo ([WILDCARD]/error_019_stack_function.ts:[WILDCARD]) diff --git a/cli/tests/testdata/run/error_020_stack_constructor.ts.out b/cli/tests/testdata/run/error_020_stack_constructor.ts.out index 01fdfb3c4..9e48b8f98 100644 --- a/cli/tests/testdata/run/error_020_stack_constructor.ts.out +++ b/cli/tests/testdata/run/error_020_stack_constructor.ts.out @@ -1,7 +1,7 @@ [WILDCARD]Error: constructor at new A ([WILDCARD]/error_020_stack_constructor.ts:[WILDCARD]) at [WILDCARD]/error_020_stack_constructor.ts:[WILDCARD] -error: Uncaught Error: constructor +error: Uncaught (in promise) Error: constructor throw new Error("constructor"); ^ at new A ([WILDCARD]/error_020_stack_constructor.ts:[WILDCARD]) diff --git a/cli/tests/testdata/run/error_021_stack_method.ts.out b/cli/tests/testdata/run/error_021_stack_method.ts.out index 999f0aaa0..9df9b1b7c 100644 --- a/cli/tests/testdata/run/error_021_stack_method.ts.out +++ b/cli/tests/testdata/run/error_021_stack_method.ts.out @@ -1,7 +1,7 @@ [WILDCARD]Error: method at A.m ([WILDCARD]/error_021_stack_method.ts:[WILDCARD]) at [WILDCARD]/error_021_stack_method.ts:[WILDCARD] -error: Uncaught Error: method +error: Uncaught (in promise) Error: method throw new Error("method"); ^ at A.m ([WILDCARD]/error_021_stack_method.ts:[WILDCARD]) diff --git a/cli/tests/testdata/run/error_022_stack_custom_error.ts.out b/cli/tests/testdata/run/error_022_stack_custom_error.ts.out index 78b0dcaea..73e033e52 100644 --- a/cli/tests/testdata/run/error_022_stack_custom_error.ts.out +++ b/cli/tests/testdata/run/error_022_stack_custom_error.ts.out @@ -1,6 +1,6 @@ [WILDCARD]CustomError: custom error at [WILDCARD]/error_022_stack_custom_error.ts:[WILDCARD] -error: Uncaught CustomError: custom error +error: Uncaught (in promise) CustomError: custom error const error = new CustomError(); ^ at [WILDCARD]/error_022_stack_custom_error.ts:[WILDCARD] diff --git a/cli/tests/testdata/run/error_023_stack_async.ts.out b/cli/tests/testdata/run/error_023_stack_async.ts.out index 95f0eae64..2d122d986 100644 --- a/cli/tests/testdata/run/error_023_stack_async.ts.out +++ b/cli/tests/testdata/run/error_023_stack_async.ts.out @@ -2,7 +2,7 @@ at [WILDCARD]/error_023_stack_async.ts:[WILDCARD] at async [WILDCARD]/error_023_stack_async.ts:[WILDCARD] at async [WILDCARD]/error_023_stack_async.ts:[WILDCARD] -error: Uncaught Error: async +error: Uncaught (in promise) Error: async throw new Error("async"); ^ at [WILDCARD]/error_023_stack_async.ts:[WILDCARD] diff --git a/cli/tests/testdata/run/error_024_stack_promise_all.ts.out b/cli/tests/testdata/run/error_024_stack_promise_all.ts.out index 6cd88715c..c7d10a649 100644 --- a/cli/tests/testdata/run/error_024_stack_promise_all.ts.out +++ b/cli/tests/testdata/run/error_024_stack_promise_all.ts.out @@ -2,7 +2,7 @@ at [WILDCARD]/error_024_stack_promise_all.ts:[WILDCARD] at async Promise.all (index 1) at async [WILDCARD]/error_024_stack_promise_all.ts:[WILDCARD] -error: Uncaught Error: Promise.all() +error: Uncaught (in promise) Error: Promise.all() throw new Error("Promise.all()"); ^ at [WILDCARD]/error_024_stack_promise_all.ts:[WILDCARD] diff --git a/cli/tests/testdata/run/error_025_tab_indent.out b/cli/tests/testdata/run/error_025_tab_indent.out index f1466ce3f..edf525c90 100644 --- a/cli/tests/testdata/run/error_025_tab_indent.out +++ b/cli/tests/testdata/run/error_025_tab_indent.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught Error: bad +[WILDCARD]error: Uncaught (in promise) Error: bad throw Error("bad"); ^ at foo ([WILDCARD]/error_025_tab_indent:2:8) diff --git a/cli/tests/testdata/run/error_026_remote_import_error.ts.out b/cli/tests/testdata/run/error_026_remote_import_error.ts.out index cc88284af..f3f8c0068 100644 --- a/cli/tests/testdata/run/error_026_remote_import_error.ts.out +++ b/cli/tests/testdata/run/error_026_remote_import_error.ts.out @@ -1,5 +1,5 @@ [WILDCARD] -error: Uncaught Error: bad +error: Uncaught (in promise) Error: bad throw Error("bad"); ^ at foo (http://localhost:4545/run/error_001.ts:2:9) diff --git a/cli/tests/testdata/run/error_cause.ts.out b/cli/tests/testdata/run/error_cause.ts.out index 6a8555646..4dc439ac9 100644 --- a/cli/tests/testdata/run/error_cause.ts.out +++ b/cli/tests/testdata/run/error_cause.ts.out @@ -1,4 +1,4 @@ -error: Uncaught Error: foo +error: Uncaught (in promise) Error: foo throw new Error("foo", { cause: new Error("bar", { cause: "deno" as any }) }); ^ at a (file:///[WILDCARD]/error_cause.ts:3:9) diff --git a/cli/tests/testdata/run/error_cause_recursive.ts.out b/cli/tests/testdata/run/error_cause_recursive.ts.out index 9c381a974..52d5a03a1 100644 --- a/cli/tests/testdata/run/error_cause_recursive.ts.out +++ b/cli/tests/testdata/run/error_cause_recursive.ts.out @@ -1,4 +1,4 @@ -error: Uncaught Error: bar <ref *1> +error: Uncaught (in promise) Error: bar <ref *1> const y = new Error("bar", { cause: x }); ^ at file:///[WILDCARD]/error_cause_recursive.ts:2:11 diff --git a/cli/tests/testdata/run/error_name_non_string.js.out b/cli/tests/testdata/run/error_name_non_string.js.out index a77f336e9..14fa56c62 100644 --- a/cli/tests/testdata/run/error_name_non_string.js.out +++ b/cli/tests/testdata/run/error_name_non_string.js.out @@ -1,4 +1,4 @@ -error: Uncaught Error +error: Uncaught (in promise) Error throw new ErrorNameNonString(); ^ at file:///[WILDCARD]/error_name_non_string.js:[WILDCARD] diff --git a/cli/tests/testdata/run/error_with_errors_prop.js.out b/cli/tests/testdata/run/error_with_errors_prop.js.out index 946b5ad84..d958996af 100644 --- a/cli/tests/testdata/run/error_with_errors_prop.js.out +++ b/cli/tests/testdata/run/error_with_errors_prop.js.out @@ -11,7 +11,7 @@ Error: Error with errors prop. ] } -error: Uncaught Error: Error with errors prop. +error: Uncaught (in promise) Error: Error with errors prop. const error = new Error("Error with errors prop."); ^ at [WILDCARD]/error_with_errors_prop.js:1:15 diff --git a/cli/tests/testdata/run/extension_dynamic_import.ts.out b/cli/tests/testdata/run/extension_dynamic_import.ts.out index 4414ad923..b22717d62 100644 --- a/cli/tests/testdata/run/extension_dynamic_import.ts.out +++ b/cli/tests/testdata/run/extension_dynamic_import.ts.out @@ -1,10 +1,4 @@ -error: Uncaught (in promise) TypeError: Unsupported scheme "ext" for module "ext:runtime/01_errors.js". Supported schemes: [ - "data", - "blob", - "file", - "http", - "https", -] +error: Uncaught (in promise) TypeError: Importing ext: modules is only allowed from ext: and node: modules. Tried to import ext:runtime/01_errors.js from [WILDCARD]/testdata/run/extension_dynamic_import.ts await import("ext:runtime/01_errors.js"); ^ - at async [WILDCARD]/extension_dynamic_import.ts:1:1 + at async [WILDCARD]/run/extension_dynamic_import.ts:1:1 diff --git a/cli/tests/testdata/run/import_data_url_error_stack.ts.out b/cli/tests/testdata/run/import_data_url_error_stack.ts.out index e79b52b30..83eed611d 100644 --- a/cli/tests/testdata/run/import_data_url_error_stack.ts.out +++ b/cli/tests/testdata/run/import_data_url_error_stack.ts.out @@ -1,4 +1,4 @@ -error: Uncaught Error: Hello 2 +error: Uncaught (in promise) Error: Hello 2 throw new Error(`Hello ${A.C}`); ^ at a (data:application/typescript;base64,ZW51bSBBIHsKICBBLAog......JHtBLkN9YCk7CiB9CiA=:8:10) diff --git a/cli/tests/testdata/run/inline_js_source_map_2.js.out b/cli/tests/testdata/run/inline_js_source_map_2.js.out index 72a531b0b..ba3053eba 100644 --- a/cli/tests/testdata/run/inline_js_source_map_2.js.out +++ b/cli/tests/testdata/run/inline_js_source_map_2.js.out @@ -1,2 +1,2 @@ -error: Uncaught Error: Hello world! +error: Uncaught (in promise) Error: Hello world! at http://localhost:4545/run/inline_js_source_map_2.ts:6:7 diff --git a/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out b/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out index 72a531b0b..ba3053eba 100644 --- a/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out +++ b/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out @@ -1,2 +1,2 @@ -error: Uncaught Error: Hello world! +error: Uncaught (in promise) Error: Hello world! at http://localhost:4545/run/inline_js_source_map_2.ts:6:7 diff --git a/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out b/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out index 9a5a26a68..d80a1c7bb 100644 --- a/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out +++ b/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out @@ -1,4 +1,4 @@ -error: Uncaught Error: Hello world! +error: Uncaught (in promise) Error: Hello world! // throw new Error("Hello world!" as string); ^ at http://localhost:4545/run/inline_js_source_map.ts:6:7 diff --git a/cli/tests/testdata/run/nested_error/main.ts.out b/cli/tests/testdata/run/nested_error/main.ts.out index 47c818ac1..05780bc6a 100644 --- a/cli/tests/testdata/run/nested_error/main.ts.out +++ b/cli/tests/testdata/run/nested_error/main.ts.out @@ -1,4 +1,4 @@ -error: Uncaught { +error: Uncaught (in promise) { foo: Error at file:///[WILDCARD]/main.ts:2:8 } diff --git a/cli/tests/testdata/run/node_env_var_allowlist.ts.out b/cli/tests/testdata/run/node_env_var_allowlist.ts.out index 62f335c0f..ea66a2965 100644 --- a/cli/tests/testdata/run/node_env_var_allowlist.ts.out +++ b/cli/tests/testdata/run/node_env_var_allowlist.ts.out @@ -1,5 +1,5 @@ ok -[WILDCARD]error: Uncaught PermissionDenied: Requires env access to "NOT_NODE_DEBUG", run again with the --allow-env flag +[WILDCARD]error: Uncaught (in promise) PermissionDenied: Requires env access to "NOT_NODE_DEBUG", run again with the --allow-env flag Deno.env.get("NOT_NODE_DEBUG"); ^ at [WILDCARD] diff --git a/cli/tests/testdata/run/with_config/auto_discovery_log.out b/cli/tests/testdata/run/with_config/auto_discovery_log.out index 601c1adc6..1a25eb9a7 100644 --- a/cli/tests/testdata/run/with_config/auto_discovery_log.out +++ b/cli/tests/testdata/run/with_config/auto_discovery_log.out @@ -1,3 +1,4 @@ DEBUG RS - [WILDCARD] - Config file found at '[WILDCARD]deno.jsonc' [WILDCARD] ok +[WILDCARD] diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out b/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out index ee6e346de..b9f9a6dea 100644 --- a/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out +++ b/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out @@ -1,3 +1,4 @@ [WILDCARD]package.json auto-discovery is disabled [WILDCARD] success +[WILDCARD] diff --git a/cli/tests/testdata/run/with_package_json/npm_binary/main.out b/cli/tests/testdata/run/with_package_json/npm_binary/main.out index 56cdae6f9..13d196a5e 100644 --- a/cli/tests/testdata/run/with_package_json/npm_binary/main.out +++ b/cli/tests/testdata/run/with_package_json/npm_binary/main.out @@ -4,3 +4,4 @@ this is a test +[WILDCARD] diff --git a/cli/tests/testdata/test/no_check.out b/cli/tests/testdata/test/no_check.out index adef03aee..66ad07e26 100644 --- a/cli/tests/testdata/test/no_check.out +++ b/cli/tests/testdata/test/no_check.out @@ -3,10 +3,10 @@ Uncaught error from ./test/no_check.ts FAILED ERRORS ./test/no_check.ts (uncaught error) -error: TypeError: Cannot read properties of undefined (reading 'fn') +error: (in promise) TypeError: Cannot read properties of undefined (reading 'fn') Deno.test(); ^ - at [WILDCARD]/test/no_check.ts:1:6 + at [WILDCARD] This error was not caught from a test and caused the test runner to fail on the referenced module. It most likely originated from a dangling promise, event/timeout handler or top-level code. diff --git a/cli/tests/testdata/test/uncaught_errors.out b/cli/tests/testdata/test/uncaught_errors.out index 2eae72e21..a52f95d57 100644 --- a/cli/tests/testdata/test/uncaught_errors.out +++ b/cli/tests/testdata/test/uncaught_errors.out @@ -39,7 +39,7 @@ error: Error: bar 3 message at [WILDCARD]/test/uncaught_errors_2.ts:7:9 ./test/uncaught_errors_3.ts (uncaught error) -error: Error: baz +error: (in promise) Error: baz throw new Error("baz"); ^ at [WILDCARD]/test/uncaught_errors_3.ts:1:7 diff --git a/cli/tests/testdata/workers/close_nested_child.js b/cli/tests/testdata/workers/close_nested_child.js index bd95ae08c..7c6ad603c 100644 --- a/cli/tests/testdata/workers/close_nested_child.js +++ b/cli/tests/testdata/workers/close_nested_child.js @@ -4,4 +4,5 @@ console.log("Starting the child worker"); setTimeout(() => { console.log("The child worker survived the death of the parent!!!"); + Deno.exit(1); }, 2000); diff --git a/cli/tests/testdata/workers/error_event.ts.out b/cli/tests/testdata/workers/error_event.ts.out index 9c075e23e..833cca8be 100644 --- a/cli/tests/testdata/workers/error_event.ts.out +++ b/cli/tests/testdata/workers/error_event.ts.out @@ -1,10 +1,10 @@ -error: Uncaught (in worker "") Error: foo +error: Uncaught (in worker "") (in promise) Error: foo throw new Error("foo"); ^ at foo ([WILDCARD]/error.ts:2:9) at [WILDCARD]/error.ts:5:1 { - message: "Uncaught Error: foo", + message: "Uncaught (in promise) Error: foo", filename: "[WILDCARD]/error.ts", lineno: 2, colno: 9 diff --git a/cli/tests/testdata/workers/test.ts b/cli/tests/testdata/workers/test.ts index 0f0a2e1c6..e052cf46b 100644 --- a/cli/tests/testdata/workers/test.ts +++ b/cli/tests/testdata/workers/test.ts @@ -94,7 +94,10 @@ Deno.test({ resolve(e.message); }; - assertMatch(await promise as string, /Uncaught Error: Thrown error/); + assertMatch( + await promise as string, + /Uncaught \(in promise\) Error: Thrown error/, + ); throwingWorker.terminate(); }, }); diff --git a/cli/tests/testdata/workers/worker_error.ts.out b/cli/tests/testdata/workers/worker_error.ts.out index 78d0c423e..1dd017770 100644 --- a/cli/tests/testdata/workers/worker_error.ts.out +++ b/cli/tests/testdata/workers/worker_error.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught (in worker "bar") Error: foo[WILDCARD] +[WILDCARD]error: Uncaught (in worker "bar") (in promise) Error: foo[WILDCARD] at foo ([WILDCARD]) at [WILDCARD] error: Uncaught (in promise) Error: Unhandled error in child worker. diff --git a/cli/tests/testdata/workers/worker_nested_error.ts.out b/cli/tests/testdata/workers/worker_nested_error.ts.out index 15cb85b48..3622acfb3 100644 --- a/cli/tests/testdata/workers/worker_nested_error.ts.out +++ b/cli/tests/testdata/workers/worker_nested_error.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught (in worker "bar") Error: foo[WILDCARD] +[WILDCARD]error: Uncaught (in worker "bar") (in promise) Error: foo[WILDCARD] throw new Error("foo"); ^ at foo ([WILDCARD]/workers/error.ts:[WILDCARD]) |