diff options
-rw-r--r-- | cli/tests/integration_tests.rs | 108 | ||||
-rw-r--r-- | cli/tests/test/deno_test.out (renamed from cli/tests/deno_test.out) | 0 | ||||
-rw-r--r-- | cli/tests/test/deno_test_fail_fast.out (renamed from cli/tests/deno_test_fail_fast.out) | 0 | ||||
-rw-r--r-- | cli/tests/test/deno_test_no_color.ts (renamed from cli/tests/deno_test_no_color.ts) | 0 | ||||
-rw-r--r-- | cli/tests/test/deno_test_only.ts (renamed from cli/tests/deno_test_only.ts) | 0 | ||||
-rw-r--r-- | cli/tests/test/deno_test_only.ts.out (renamed from cli/tests/deno_test_only.ts.out) | 0 | ||||
-rw-r--r-- | cli/tests/test/deno_test_unresolved_promise.out (renamed from cli/tests/deno_test_unresolved_promise.out) | 0 | ||||
-rw-r--r-- | cli/tests/test/exit_sanitizer_test.out (renamed from cli/tests/exit_sanitizer_test.out) | 0 | ||||
-rw-r--r-- | cli/tests/test/exit_sanitizer_test.ts (renamed from cli/tests/exit_sanitizer_test.ts) | 0 | ||||
-rw-r--r-- | cli/tests/test/test_finally_cleartimeout.out (renamed from cli/tests/test_finally_cleartimeout.out) | 0 | ||||
-rw-r--r-- | cli/tests/test/test_finally_cleartimeout.ts (renamed from cli/tests/test_finally_cleartimeout.ts) | 0 | ||||
-rw-r--r-- | cli/tests/test/test_runner_test.ts (renamed from cli/tests/test_runner_test.ts) | 2 | ||||
-rw-r--r-- | cli/tests/test/test_unresolved_promise.js (renamed from cli/tests/test_unresolved_promise.js) | 0 |
13 files changed, 57 insertions, 53 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 0d076f180..d07fe1b22 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2238,28 +2238,6 @@ mod integration { } } - #[test] - fn deno_test_no_color() { - let (out, _) = util::run_and_collect_output( - false, - "test deno_test_no_color.ts", - None, - Some(vec![("NO_COLOR".to_owned(), "true".to_owned())]), - false, - ); - // ANSI escape codes should be stripped. - assert!(out.contains("test success ... ok")); - assert!(out.contains("test fail ... FAILED")); - assert!(out.contains("test ignored ... ignored")); - assert!(out.contains("test result: FAILED. 1 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out")); - } - - itest!(test_exit_sanitizer { - args: "test exit_sanitizer_test.ts", - output: "exit_sanitizer_test.out", - exit_code: 1, - }); - itest!(stdout_write_all { args: "run --quiet stdout_write_all.ts", output: "stdout_write_all.out", @@ -2386,41 +2364,67 @@ mod integration { http_server: true, }); - itest!(deno_test { - args: "test test_runner_test.ts", - exit_code: 1, - output: "deno_test.out", - }); + mod test { + use super::*; - itest!(deno_test_fail_fast { - args: "test --fail-fast test_runner_test.ts", - exit_code: 1, - output: "deno_test_fail_fast.out", - }); + #[test] + fn no_color() { + let (out, _) = util::run_and_collect_output( + false, + "test test/deno_test_no_color.ts", + None, + Some(vec![("NO_COLOR".to_owned(), "true".to_owned())]), + false, + ); + // ANSI escape codes should be stripped. + assert!(out.contains("test success ... ok")); + assert!(out.contains("test fail ... FAILED")); + assert!(out.contains("test ignored ... ignored")); + assert!(out.contains("test result: FAILED. 1 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out")); + } - itest!(deno_test_only { - args: "test deno_test_only.ts", - exit_code: 1, - output: "deno_test_only.ts.out", - }); + itest!(all { + args: "test test/test_runner_test.ts", + exit_code: 1, + output: "test/deno_test.out", + }); - itest!(deno_test_no_check { - args: "test --no-check test_runner_test.ts", - exit_code: 1, - output: "deno_test.out", - }); + itest!(fail_fast { + args: "test --fail-fast test/test_runner_test.ts", + exit_code: 1, + output: "test/deno_test_fail_fast.out", + }); - itest!(deno_test_finally_cleartimeout { - args: "test test_finally_cleartimeout.ts", - exit_code: 1, - output: "test_finally_cleartimeout.out", - }); + itest!(only { + args: "test test/deno_test_only.ts", + exit_code: 1, + output: "test/deno_test_only.ts.out", + }); - itest!(deno_test_unresolved_promise { - args: "test test_unresolved_promise.js", - exit_code: 1, - output: "deno_test_unresolved_promise.out", - }); + itest!(no_check { + args: "test --no-check test/test_runner_test.ts", + exit_code: 1, + output: "test/deno_test.out", + }); + + itest!(finally_cleartimeout { + args: "test test/test_finally_cleartimeout.ts", + exit_code: 1, + output: "test/test_finally_cleartimeout.out", + }); + + itest!(unresolved_promise { + args: "test test/test_unresolved_promise.js", + exit_code: 1, + output: "test/deno_test_unresolved_promise.out", + }); + + itest!(exit_sanitizer { + args: "test test/exit_sanitizer_test.ts", + output: "test/exit_sanitizer_test.out", + exit_code: 1, + }); + } #[test] fn timeout_clear() { diff --git a/cli/tests/deno_test.out b/cli/tests/test/deno_test.out index 338f804ed..338f804ed 100644 --- a/cli/tests/deno_test.out +++ b/cli/tests/test/deno_test.out diff --git a/cli/tests/deno_test_fail_fast.out b/cli/tests/test/deno_test_fail_fast.out index 9fb82c1c6..9fb82c1c6 100644 --- a/cli/tests/deno_test_fail_fast.out +++ b/cli/tests/test/deno_test_fail_fast.out diff --git a/cli/tests/deno_test_no_color.ts b/cli/tests/test/deno_test_no_color.ts index 38c531ee9..38c531ee9 100644 --- a/cli/tests/deno_test_no_color.ts +++ b/cli/tests/test/deno_test_no_color.ts diff --git a/cli/tests/deno_test_only.ts b/cli/tests/test/deno_test_only.ts index 12425f21f..12425f21f 100644 --- a/cli/tests/deno_test_only.ts +++ b/cli/tests/test/deno_test_only.ts diff --git a/cli/tests/deno_test_only.ts.out b/cli/tests/test/deno_test_only.ts.out index a23f2505c..a23f2505c 100644 --- a/cli/tests/deno_test_only.ts.out +++ b/cli/tests/test/deno_test_only.ts.out diff --git a/cli/tests/deno_test_unresolved_promise.out b/cli/tests/test/deno_test_unresolved_promise.out index cc4f2985e..cc4f2985e 100644 --- a/cli/tests/deno_test_unresolved_promise.out +++ b/cli/tests/test/deno_test_unresolved_promise.out diff --git a/cli/tests/exit_sanitizer_test.out b/cli/tests/test/exit_sanitizer_test.out index 351453928..351453928 100644 --- a/cli/tests/exit_sanitizer_test.out +++ b/cli/tests/test/exit_sanitizer_test.out diff --git a/cli/tests/exit_sanitizer_test.ts b/cli/tests/test/exit_sanitizer_test.ts index 186406a9d..186406a9d 100644 --- a/cli/tests/exit_sanitizer_test.ts +++ b/cli/tests/test/exit_sanitizer_test.ts diff --git a/cli/tests/test_finally_cleartimeout.out b/cli/tests/test/test_finally_cleartimeout.out index c88b8242b..c88b8242b 100644 --- a/cli/tests/test_finally_cleartimeout.out +++ b/cli/tests/test/test_finally_cleartimeout.out diff --git a/cli/tests/test_finally_cleartimeout.ts b/cli/tests/test/test_finally_cleartimeout.ts index dcc0a4d64..dcc0a4d64 100644 --- a/cli/tests/test_finally_cleartimeout.ts +++ b/cli/tests/test/test_finally_cleartimeout.ts diff --git a/cli/tests/test_runner_test.ts b/cli/tests/test/test_runner_test.ts index 08b69a0a6..111ff51c7 100644 --- a/cli/tests/test_runner_test.ts +++ b/cli/tests/test/test_runner_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import { assert } from "../../test_util/std/testing/asserts.ts"; +import { assert } from "../../../test_util/std/testing/asserts.ts"; Deno.test("fail1", function () { assert(false, "fail1 assertion"); diff --git a/cli/tests/test_unresolved_promise.js b/cli/tests/test/test_unresolved_promise.js index 466b18864..466b18864 100644 --- a/cli/tests/test_unresolved_promise.js +++ b/cli/tests/test/test_unresolved_promise.js |