summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests.rs
diff options
context:
space:
mode:
authoruki00a <uki00a@gmail.com>2020-06-19 19:10:31 +0900
committerGitHub <noreply@github.com>2020-06-19 12:10:31 +0200
commit345a5b3dff3a333d156bf4aff9f7e2a355d59746 (patch)
treeb0ea74a1e05461445a93f011efdfe5c827f977af /cli/tests/integration_tests.rs
parentffedbd79ad90bc88ef8c51d145536f68f50d4fea (diff)
fix: "deno test" should respect NO_COLOR=true (#6371)
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r--cli/tests/integration_tests.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index cbd0dbc26..78a89eb2b 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -1120,6 +1120,22 @@ fn repl_test_assign_underscore_error() {
}
#[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"));
+}
+
+#[test]
fn util_test() {
util::run_python_script("tools/util_test.py")
}