diff options
Diffstat (limited to 'cli/tests/repl_tests.rs')
-rw-r--r-- | cli/tests/repl_tests.rs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/cli/tests/repl_tests.rs b/cli/tests/repl_tests.rs index edc7918f9..281ae0746 100644 --- a/cli/tests/repl_tests.rs +++ b/cli/tests/repl_tests.rs @@ -732,7 +732,7 @@ mod repl { ); assert_contains!( test_util::strip_ansi_codes(&out), - "error in --eval flag. parse error: Unexpected token `%`." + "Error in --eval flag: parse error: Unexpected token `%`." ); assert_contains!(out, "2500"); // should not prevent input assert!(err.is_empty()); @@ -747,7 +747,7 @@ mod repl { None, false, ); - assert_contains!(out, "error in --eval flag. Uncaught Error: Testing"); + assert_contains!(out, "Error in --eval flag: Uncaught Error: Testing"); assert_contains!(out, "2500"); // should not prevent input assert!(err.is_empty()); } @@ -881,4 +881,19 @@ mod repl { assert_contains!(out, "AggregateError"); assert!(err.is_empty()); } + + #[test] + fn repl_with_quiet_flag() { + let (out, err) = util::run_and_collect_output_with_args( + true, + vec!["repl", "--quiet"], + Some(vec!["await Promise.resolve('done')"]), + Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]), + false, + ); + assert!(!out.contains("Deno")); + assert!(!out.contains("exit using ctrl+d, ctrl+c, or close()")); + assert_ends_with!(out, "\"done\"\n"); + assert!(err.is_empty()); + } } |