summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/deno_test.out25
-rw-r--r--cli/tests/deno_test_fail_fast.out14
-rw-r--r--cli/tests/integration_tests.rs12
-rw-r--r--cli/tests/test_runner_test.ts19
4 files changed, 70 insertions, 0 deletions
diff --git a/cli/tests/deno_test.out b/cli/tests/deno_test.out
new file mode 100644
index 000000000..8fe589613
--- /dev/null
+++ b/cli/tests/deno_test.out
@@ -0,0 +1,25 @@
+running 4 tests
+test fail1 ... FAILED [WILDCARD]
+test fail2 ... FAILED [WILDCARD]
+test success1 ... ok [WILDCARD]
+test fail3 ... FAILED [WILDCARD]
+
+failures:
+
+fail1
+AssertionError: fail1 assertion
+[WILDCARD]
+
+fail2
+AssertionError: fail2 assertion
+[WILDCARD]
+
+fail3
+AssertionError: fail3 assertion
+[WILDCARD]
+
+failures:
+[WILDCARD]
+
+test result: FAILED. 1 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
+
diff --git a/cli/tests/deno_test_fail_fast.out b/cli/tests/deno_test_fail_fast.out
new file mode 100644
index 000000000..f4d111bcc
--- /dev/null
+++ b/cli/tests/deno_test_fail_fast.out
@@ -0,0 +1,14 @@
+running 4 tests
+test fail1 ... FAILED [WILDCARD]
+
+failures:
+
+fail1
+AssertionError: fail1 assertion
+[WILDCARD]
+
+failures:
+[WILDCARD]
+
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
+
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 29203d411..51f849ff6 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -899,6 +899,18 @@ itest!(_026_redirect_javascript {
http_server: true,
});
+itest!(deno_test_fail_fast {
+ args: "test --failfast test_runner_test.ts",
+ exit_code: 1,
+ output: "deno_test_fail_fast.out",
+});
+
+itest!(deno_test {
+ args: "test test_runner_test.ts",
+ exit_code: 1,
+ output: "deno_test.out",
+});
+
itest!(workers {
args: "test --reload --allow-net workers_test.ts",
http_server: true,
diff --git a/cli/tests/test_runner_test.ts b/cli/tests/test_runner_test.ts
new file mode 100644
index 000000000..006eca07c
--- /dev/null
+++ b/cli/tests/test_runner_test.ts
@@ -0,0 +1,19 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+import { assert } from "../../std/testing/asserts.ts";
+
+Deno.test(function fail1() {
+ assert(false, "fail1 assertion");
+});
+
+Deno.test(function fail2() {
+ assert(false, "fail2 assertion");
+});
+
+Deno.test(function success1() {
+ assert(true);
+});
+
+Deno.test(function fail3() {
+ assert(false, "fail3 assertion");
+});