summaryrefslogtreecommitdiff
path: root/cli/tests/integration/fmt_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-04-01 11:15:37 -0400
committerGitHub <noreply@github.com>2022-04-01 11:15:37 -0400
commit1c37ac33526dc45ad0b3f83ca8294dbb55548096 (patch)
tree426978168928c5e7c2223e4906005fa23fb34cd6 /cli/tests/integration/fmt_tests.rs
parent8ca4c1819f3e7a8716c68034e256355334d53b44 (diff)
chore(tests): use custom temp dir creation for the tests (#14153)
Diffstat (limited to 'cli/tests/integration/fmt_tests.rs')
-rw-r--r--cli/tests/integration/fmt_tests.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/tests/integration/fmt_tests.rs b/cli/tests/integration/fmt_tests.rs
index 28a1dda7d..f38160a15 100644
--- a/cli/tests/integration/fmt_tests.rs
+++ b/cli/tests/integration/fmt_tests.rs
@@ -1,12 +1,12 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use crate::itest;
-use tempfile::TempDir;
use test_util as util;
+use test_util::TempDir;
#[test]
fn fmt_test() {
- let t = TempDir::new().unwrap();
+ let t = TempDir::new();
let fixed_js = util::testdata_path().join("badly_formatted_fixed.js");
let badly_formatted_original_js =
util::testdata_path().join("badly_formatted.mjs");
@@ -135,7 +135,8 @@ fn fmt_auto_ignore_git() {
let mut bad_json_file = File::create(bad_json_path).unwrap();
writeln!(bad_json_file, "bad json").unwrap();
}
- let t = TempDir::new().unwrap().path().join("target");
+ let temp_dir = TempDir::new();
+ let t = temp_dir.path().join("target");
let nest_git = t.join("nest").join(".git");
let git_dir = t.join(".git");
create_dir_all(&nest_git).unwrap();