summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r--cli/tests/integration_tests.rs108
1 files changed, 56 insertions, 52 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() {