diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-10-19 17:26:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 18:26:45 +0200 |
commit | e8ee5da459f6addd15b726ff5860cfb148c2c60f (patch) | |
tree | ad5b1d2878d70a4fc4a8904ef0ae0fc1eca608b7 /cli | |
parent | d6062b265331b88efcbe740741bd93714ec11026 (diff) |
fix(core/bindings): use is_instance_of_error() instead of is_native_error() (#12479)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 5 | ||||
-rw-r--r-- | cli/tests/testdata/eval_context_throw_dom_exception.js | 2 | ||||
-rw-r--r-- | cli/tests/testdata/eval_context_throw_dom_exception.js.out | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 0aca09902..39918d170 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -1922,3 +1922,8 @@ itest!(eval_context_throw_with_conflicting_source { output: "eval_context_throw_with_conflicting_source.ts.out", exit_code: 1, }); + +itest!(eval_context_throw_dom_exception { + args: "run eval_context_throw_dom_exception.js", + output: "eval_context_throw_dom_exception.js.out", +}); diff --git a/cli/tests/testdata/eval_context_throw_dom_exception.js b/cli/tests/testdata/eval_context_throw_dom_exception.js new file mode 100644 index 000000000..b8e99d498 --- /dev/null +++ b/cli/tests/testdata/eval_context_throw_dom_exception.js @@ -0,0 +1,2 @@ +const [, errorInfo] = Deno.core.evalContext('throw new DOMException("foo")'); +console.log(errorInfo); diff --git a/cli/tests/testdata/eval_context_throw_dom_exception.js.out b/cli/tests/testdata/eval_context_throw_dom_exception.js.out new file mode 100644 index 000000000..39e164083 --- /dev/null +++ b/cli/tests/testdata/eval_context_throw_dom_exception.js.out @@ -0,0 +1 @@ +{ thrown: DOMException: foo, isNativeError: true, isCompileError: false } |