diff options
Diffstat (limited to 'cli/tests/test')
-rw-r--r-- | cli/tests/test/deno_test_only.ts.out | 5 | ||||
-rw-r--r-- | cli/tests/test/deno_test_unresolved_promise.out | 5 | ||||
-rw-r--r-- | cli/tests/test/exit_sanitizer_test.out | 2 | ||||
-rw-r--r-- | cli/tests/test/quiet_test.out | 4 | ||||
-rw-r--r-- | cli/tests/test/quiet_test.ts | 3 | ||||
-rw-r--r-- | cli/tests/test/test_finally_cleartimeout.out | 2 | ||||
-rw-r--r-- | cli/tests/test/test_unresolved_promise.js | 8 | ||||
-rw-r--r-- | cli/tests/test/unhandled_rejection.out | 6 | ||||
-rw-r--r-- | cli/tests/test/unhandled_rejection.ts | 3 |
9 files changed, 26 insertions, 12 deletions
diff --git a/cli/tests/test/deno_test_only.ts.out b/cli/tests/test/deno_test_only.ts.out index a23f2505c..25a0b1a0c 100644 --- a/cli/tests/test/deno_test_only.ts.out +++ b/cli/tests/test/deno_test_only.ts.out @@ -1,7 +1,8 @@ -[WILDCARD]running 1 tests +[WILDCARD] +running 1 tests test def ... ok ([WILDCARD]) -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out ([WILDCARD]) FAILED because the "only" option was used diff --git a/cli/tests/test/deno_test_unresolved_promise.out b/cli/tests/test/deno_test_unresolved_promise.out index cc4f2985e..e1ec640ab 100644 --- a/cli/tests/test/deno_test_unresolved_promise.out +++ b/cli/tests/test/deno_test_unresolved_promise.out @@ -1,4 +1,5 @@ -Check [WILDCARD] running 2 tests -test unresolved promise ... in promise +test unresolved promise ... +test result: FAILED. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] + error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promise. diff --git a/cli/tests/test/exit_sanitizer_test.out b/cli/tests/test/exit_sanitizer_test.out index 351453928..25df34b34 100644 --- a/cli/tests/test/exit_sanitizer_test.out +++ b/cli/tests/test/exit_sanitizer_test.out @@ -1,4 +1,4 @@ -Check [WILDCARD]/$deno$test.ts +Check [WILDCARD]/exit_sanitizer_test.ts running 3 tests test exit(0) ... FAILED ([WILDCARD]) test exit(1) ... FAILED ([WILDCARD]) diff --git a/cli/tests/test/quiet_test.out b/cli/tests/test/quiet_test.out new file mode 100644 index 000000000..4b57c50fe --- /dev/null +++ b/cli/tests/test/quiet_test.out @@ -0,0 +1,4 @@ +running 1 tests +test log ... ok [WILDCARD] + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] diff --git a/cli/tests/test/quiet_test.ts b/cli/tests/test/quiet_test.ts new file mode 100644 index 000000000..e98e6797a --- /dev/null +++ b/cli/tests/test/quiet_test.ts @@ -0,0 +1,3 @@ +Deno.test("log", function () { + console.log("log"); +}); diff --git a/cli/tests/test/test_finally_cleartimeout.out b/cli/tests/test/test_finally_cleartimeout.out index c88b8242b..ddad7cce9 100644 --- a/cli/tests/test/test_finally_cleartimeout.out +++ b/cli/tests/test/test_finally_cleartimeout.out @@ -1,4 +1,4 @@ -Check [WILDCARD]/$deno$test.ts +Check [WILDCARD]/test_finally_cleartimeout.ts running 2 tests test error ... FAILED ([WILDCARD]) test success ... ok ([WILDCARD]) diff --git a/cli/tests/test/test_unresolved_promise.js b/cli/tests/test/test_unresolved_promise.js index 466b18864..8f50e907a 100644 --- a/cli/tests/test/test_unresolved_promise.js +++ b/cli/tests/test/test_unresolved_promise.js @@ -1,15 +1,11 @@ Deno.test({ name: "unresolved promise", fn() { - return new Promise((_resolve, _reject) => { - console.log("in promise"); - }); + return new Promise((_resolve, _reject) => {}); }, }); Deno.test({ name: "ok", - fn() { - console.log("ok test"); - }, + fn() {}, }); diff --git a/cli/tests/test/unhandled_rejection.out b/cli/tests/test/unhandled_rejection.out new file mode 100644 index 000000000..27b3865a8 --- /dev/null +++ b/cli/tests/test/unhandled_rejection.out @@ -0,0 +1,6 @@ +Check [WILDCARD] + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] + +error: Uncaught (in promise) Error: rejection +[WILDCARD] diff --git a/cli/tests/test/unhandled_rejection.ts b/cli/tests/test/unhandled_rejection.ts new file mode 100644 index 000000000..396e1c09d --- /dev/null +++ b/cli/tests/test/unhandled_rejection.ts @@ -0,0 +1,3 @@ +new Promise((resolve, reject) => { + reject(new Error("rejection")); +}); |