diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/coverage_tests.rs | 2 | ||||
-rw-r--r-- | cli/tests/fmt_tests.rs | 6 | ||||
-rw-r--r-- | cli/tests/run_tests.rs | 6 | ||||
-rw-r--r-- | cli/tests/watcher_tests.rs | 24 |
4 files changed, 19 insertions, 19 deletions
diff --git a/cli/tests/coverage_tests.rs b/cli/tests/coverage_tests.rs index 6515fd6ec..357d54ee6 100644 --- a/cli/tests/coverage_tests.rs +++ b/cli/tests/coverage_tests.rs @@ -51,7 +51,7 @@ mod coverage { // Write the inital mod.ts file std::fs::copy(mod_before_path, &mod_temp_path).unwrap(); // And the test file - std::fs::copy(mod_test_path, &mod_test_temp_path).unwrap(); + std::fs::copy(mod_test_path, mod_test_temp_path).unwrap(); // Generate coverage let status = util::deno_cmd_with_deno_dir(&deno_dir) diff --git a/cli/tests/fmt_tests.rs b/cli/tests/fmt_tests.rs index 6ace4ce5b..807306b2c 100644 --- a/cli/tests/fmt_tests.rs +++ b/cli/tests/fmt_tests.rs @@ -17,21 +17,21 @@ mod fmt { testdata_fmt_dir.join("badly_formatted.mjs"); let badly_formatted_js = t.path().join("badly_formatted.js"); let badly_formatted_js_str = badly_formatted_js.to_str().unwrap(); - std::fs::copy(&badly_formatted_original_js, &badly_formatted_js).unwrap(); + std::fs::copy(badly_formatted_original_js, &badly_formatted_js).unwrap(); let fixed_md = testdata_fmt_dir.join("badly_formatted_fixed.md"); let badly_formatted_original_md = testdata_fmt_dir.join("badly_formatted.md"); let badly_formatted_md = t.path().join("badly_formatted.md"); let badly_formatted_md_str = badly_formatted_md.to_str().unwrap(); - std::fs::copy(&badly_formatted_original_md, &badly_formatted_md).unwrap(); + std::fs::copy(badly_formatted_original_md, &badly_formatted_md).unwrap(); let fixed_json = testdata_fmt_dir.join("badly_formatted_fixed.json"); let badly_formatted_original_json = testdata_fmt_dir.join("badly_formatted.json"); let badly_formatted_json = t.path().join("badly_formatted.json"); let badly_formatted_json_str = badly_formatted_json.to_str().unwrap(); - std::fs::copy(&badly_formatted_original_json, &badly_formatted_json) + std::fs::copy(badly_formatted_original_json, &badly_formatted_json) .unwrap(); // First, check formatting by ignoring the badly formatted file. let status = util::deno_cmd() diff --git a/cli/tests/run_tests.rs b/cli/tests/run_tests.rs index 6cae9d9e3..6196f641d 100644 --- a/cli/tests/run_tests.rs +++ b/cli/tests/run_tests.rs @@ -2505,7 +2505,7 @@ mod run { .unwrap(); assert!(status.success()); std::fs::write(&mod1_path, "export { foo } from \"./mod2.ts\";").unwrap(); - std::fs::write(&mod2_path, "(").unwrap(); + std::fs::write(mod2_path, "(").unwrap(); let status = deno_cmd .current_dir(util::testdata_path()) .arg("run") @@ -2528,7 +2528,7 @@ mod run { let mut deno_cmd = util::deno_cmd(); // With a fresh `DENO_DIR`, run a module with a dependency and a type error. std::fs::write(&mod1_path, "import './mod2.ts'; Deno.exit('0');").unwrap(); - std::fs::write(&mod2_path, "console.log('Hello, world!');").unwrap(); + std::fs::write(mod2_path, "console.log('Hello, world!');").unwrap(); let status = deno_cmd .current_dir(util::testdata_path()) .arg("run") @@ -2969,7 +2969,7 @@ mod run { assert!(output.status.success()); let prg = util::deno_exe_path(); - let output = Command::new(&prg) + let output = Command::new(prg) .env("DENO_DIR", deno_dir.path()) .env("HTTP_PROXY", "http://nil") .env("NO_COLOR", "1") diff --git a/cli/tests/watcher_tests.rs b/cli/tests/watcher_tests.rs index f9c8e1508..06af71eb4 100644 --- a/cli/tests/watcher_tests.rs +++ b/cli/tests/watcher_tests.rs @@ -105,7 +105,7 @@ mod watcher { util::testdata_path().join("lint/watch/badly_linted_fixed2.js.out"); let badly_linted = t.path().join("badly_linted.js"); - std::fs::copy(&badly_linted_original, &badly_linted).unwrap(); + std::fs::copy(badly_linted_original, &badly_linted).unwrap(); let mut child = util::deno_cmd() .current_dir(util::testdata_path()) @@ -125,7 +125,7 @@ mod watcher { assert_eq!(output, expected); // Change content of the file again to be badly-linted1 - std::fs::copy(&badly_linted_fixed1, &badly_linted).unwrap(); + std::fs::copy(badly_linted_fixed1, &badly_linted).unwrap(); std::thread::sleep(std::time::Duration::from_secs(1)); output = read_all_lints(&mut stderr_lines); @@ -133,7 +133,7 @@ mod watcher { assert_eq!(output, expected); // Change content of the file again to be badly-linted1 - std::fs::copy(&badly_linted_fixed2, &badly_linted).unwrap(); + std::fs::copy(badly_linted_fixed2, &badly_linted).unwrap(); output = read_all_lints(&mut stderr_lines); let expected = std::fs::read_to_string(badly_linted_fixed2_output).unwrap(); @@ -163,7 +163,7 @@ mod watcher { util::testdata_path().join("lint/watch/badly_linted_fixed2.js.out"); let badly_linted = t.path().join("badly_linted.js"); - std::fs::copy(&badly_linted_original, &badly_linted).unwrap(); + std::fs::copy(badly_linted_original, &badly_linted).unwrap(); let mut child = util::deno_cmd() .current_dir(t.path()) @@ -183,14 +183,14 @@ mod watcher { assert_eq!(output, expected); // Change content of the file again to be badly-linted1 - std::fs::copy(&badly_linted_fixed1, &badly_linted).unwrap(); + std::fs::copy(badly_linted_fixed1, &badly_linted).unwrap(); output = read_all_lints(&mut stderr_lines); let expected = std::fs::read_to_string(badly_linted_fixed1_output).unwrap(); assert_eq!(output, expected); // Change content of the file again to be badly-linted1 - std::fs::copy(&badly_linted_fixed2, &badly_linted).unwrap(); + std::fs::copy(badly_linted_fixed2, &badly_linted).unwrap(); std::thread::sleep(std::time::Duration::from_secs(1)); output = read_all_lints(&mut stderr_lines); @@ -216,8 +216,8 @@ mod watcher { let badly_linted_1 = t.path().join("badly_linted_1.js"); let badly_linted_2 = t.path().join("badly_linted_2.js"); - std::fs::copy(&badly_linted_fixed0, &badly_linted_1).unwrap(); - std::fs::copy(&badly_linted_fixed1, &badly_linted_2).unwrap(); + std::fs::copy(badly_linted_fixed0, badly_linted_1).unwrap(); + std::fs::copy(badly_linted_fixed1, &badly_linted_2).unwrap(); let mut child = util::deno_cmd() .current_dir(util::testdata_path()) @@ -236,7 +236,7 @@ mod watcher { "Checked 2 files" ); - std::fs::copy(&badly_linted_fixed2, &badly_linted_2).unwrap(); + std::fs::copy(badly_linted_fixed2, badly_linted_2).unwrap(); assert_contains!( read_line("Checked", &mut stderr_lines), @@ -356,7 +356,7 @@ mod watcher { let badly_formatted_1 = t.path().join("badly_formatted_1.js"); let badly_formatted_2 = t.path().join("badly_formatted_2.js"); std::fs::copy(&badly_formatted_original, &badly_formatted_1).unwrap(); - std::fs::copy(&badly_formatted_original, &badly_formatted_2).unwrap(); + std::fs::copy(&badly_formatted_original, badly_formatted_2).unwrap(); let mut child = util::deno_cmd() .current_dir(&fmt_testdata_path) @@ -868,7 +868,7 @@ mod watcher { ) .unwrap(); write( - &bar_test, + bar_test, "import bar from './bar.js'; Deno.test('bar', bar);", ) .unwrap(); @@ -1102,7 +1102,7 @@ mod watcher { .unwrap(); let file_to_watch2 = t.path().join("imported.js"); write( - &file_to_watch2, + file_to_watch2, r#" import "./imported2.js"; console.log("I'm dynamically imported and I cause restarts!"); |