summaryrefslogtreecommitdiff
path: root/cli/tests/integration/flags_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration/flags_tests.rs')
-rw-r--r--cli/tests/integration/flags_tests.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/cli/tests/integration/flags_tests.rs b/cli/tests/integration/flags_tests.rs
index 695283aca..89a8978dd 100644
--- a/cli/tests/integration/flags_tests.rs
+++ b/cli/tests/integration/flags_tests.rs
@@ -1,7 +1,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-use std::process::Stdio;
use test_util as util;
+use util::assert_contains;
#[test]
fn help_flag() {
@@ -20,14 +20,9 @@ fn help_output() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("--help")
- .stdout(Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
+ .run();
- assert!(output.status.success());
- let stdout = std::str::from_utf8(&output.stdout).unwrap();
+ let stdout = output.combined_output();
let subcommand_descriptions = vec![
"Run a JavaScript or TypeScript program",
"Run benchmarks",
@@ -56,7 +51,7 @@ fn help_output() {
];
for description in subcommand_descriptions {
- assert!(stdout.contains(description));
+ assert_contains!(stdout, description);
}
}