summaryrefslogtreecommitdiff
path: root/cli/tests/test_runner_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-03-19 14:26:47 +0100
committerGitHub <noreply@github.com>2020-03-19 14:26:47 +0100
commit8de4a05f2a93f194f71b959f4d47a1b4fc61aa41 (patch)
treec2e0a4ad75fe5d4d05d30e495fa7106a297c741c /cli/tests/test_runner_test.ts
parent5b10ab0984fd762c14caf524d59ec8b6940d2bfb (diff)
fix: std/testing/runner.ts and deno test (#4392)
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1. * fixed argument value passed to Deno.runTests() in deno test * fixed argument value passed to Deno.runTests() in std/testing/runner.ts * added integration tests for deno test to ensure failFast and exitOnFail work as expected * don't write test file to file system, but keep it in memory
Diffstat (limited to 'cli/tests/test_runner_test.ts')
-rw-r--r--cli/tests/test_runner_test.ts19
1 files changed, 19 insertions, 0 deletions
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");
+});