diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-11-17 10:05:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 10:05:42 -0500 |
commit | 29011d592968d4d645b909ee28d5fffe0473f285 (patch) | |
tree | 6fff9ff335ce75898060d1c658b028d033b1abdc /cli/tests/integration/compile_tests.rs | |
parent | b7d14d9bd56b392d95f31fe90f66a469d3ce4a87 (diff) |
chore: various improvements to tests (#21222)
Diffstat (limited to 'cli/tests/integration/compile_tests.rs')
-rw-r--r-- | cli/tests/integration/compile_tests.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index 591d38d3d..78249079d 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -1,6 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -use std::fs::File; use test_util as util; use util::assert_contains; use util::assert_not_contains; @@ -219,7 +218,7 @@ fn compile_with_file_exists_error() { dir.path().join("args/") }; let file_path = dir.path().join("args"); - File::create(&file_path).unwrap(); + file_path.write(""); context .new_command() .args_vec([ @@ -294,9 +293,7 @@ fn compile_with_conflict_file_exists_error() { exe )) .assert_exit_code(1); - assert!(std::fs::read(&exe) - .unwrap() - .eq(b"SHOULD NOT BE OVERWRITTEN")); + exe.assert_matches_text("SHOULD NOT BE OVERWRITTEN"); } #[test] |