mirror of
https://github.com/denoland/deno
synced 2024-08-24 18:47:06 +00:00
Add error tests
This commit is contained in:
parent
2c8bdd2f5f
commit
9be36ffbf8
9
tests/error_001.ts
Normal file
9
tests/error_001.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
function foo() {
|
||||
throw Error("bad");
|
||||
}
|
||||
|
||||
function bar() {
|
||||
foo()
|
||||
}
|
||||
|
||||
bar()
|
9
tests/error_001.ts.out
Normal file
9
tests/error_001.ts.out
Normal file
|
@ -0,0 +1,9 @@
|
|||
Error: bad
|
||||
at foo (file://[WILDCARD]tests/error_001.ts:2:9)
|
||||
at bar (file://[WILDCARD]tests/error_001.ts:6:3)
|
||||
at eval (file://[WILDCARD]tests/error_001.ts:9:1)
|
||||
at eval (<anonymous>)
|
||||
at execute (deno/js/runtime.ts:[WILDCARD])
|
||||
at FileModule.compileAndRun (deno/js/runtime.ts:[WILDCARD])
|
||||
at denoMain (deno/js/main.ts:[WILDCARD])
|
||||
at deno_main.js:1:1
|
11
tests/error_002.ts.out
Normal file
11
tests/error_002.ts.out
Normal file
|
@ -0,0 +1,11 @@
|
|||
Error: exception from mod1
|
||||
at Object.throwsError (file://[WILDCARD]tests/subdir/mod1.ts:16:9)
|
||||
at foo (file://[WILDCARD]tests/error_002.ts:4:3)
|
||||
at eval (file://[WILDCARD]tests/error_002.ts:7:1)
|
||||
at localDefine (deno/js/runtime.ts:[WILDCARD])
|
||||
at eval ([WILDCARD]tests/error_002.ts, <anonymous>)
|
||||
at eval (<anonymous>)
|
||||
at execute (deno/js/runtime.ts:[WILDCARD])
|
||||
at FileModule.compileAndRun (deno/js/runtime.ts:[WILDCARD])
|
||||
at denoMain (deno/js/main.ts:[WILDCARD])
|
||||
at deno_main.js:1:1
|
Loading…
Reference in a new issue