mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
Add TestErrors
This commit is contained in:
parent
8d2d66256e
commit
fe6e4febdb
2 changed files with 23 additions and 0 deletions
|
@ -130,3 +130,17 @@ func TestIntegrationUrlArgs(t *testing.T) {
|
||||||
t.Fatalf("Expected 404 at '%s'", cacheFn)
|
t.Fatalf("Expected 404 at '%s'", cacheFn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestErrors(t *testing.T) {
|
||||||
|
integrationTestSetup()
|
||||||
|
|
||||||
|
_, _, err := deno("testdata/013_async_throw.ts")
|
||||||
|
if err == nil {
|
||||||
|
t.Fatalf("Expected error.")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, _, err = deno("testdata/007_stack_trace.ts")
|
||||||
|
if err == nil {
|
||||||
|
t.Fatalf("Expected error.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
9
testdata/013_async_throw.ts
vendored
Normal file
9
testdata/013_async_throw.ts
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
console.log("hello");
|
||||||
|
const foo = async () => {
|
||||||
|
console.log("before error");
|
||||||
|
throw Error("error");
|
||||||
|
}
|
||||||
|
|
||||||
|
foo();
|
||||||
|
console.log("world");
|
Loading…
Reference in a new issue