summaryrefslogtreecommitdiff
path: root/cli/tests/integration/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration/mod.rs')
-rw-r--r--cli/tests/integration/mod.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs
index 98b203ee9..86a980f59 100644
--- a/cli/tests/integration/mod.rs
+++ b/cli/tests/integration/mod.rs
@@ -12,8 +12,8 @@ use std::io::Cursor;
use std::io::{Read, Write};
use std::process::Command;
use std::sync::Arc;
-use tempfile::TempDir;
use test_util as util;
+use test_util::TempDir;
use tokio::task::LocalSet;
#[macro_export]
@@ -139,7 +139,7 @@ itest!(types {
#[test]
fn cache_test() {
let _g = util::http_server();
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let module_url =
url::Url::parse("http://localhost:4545/006_url_imports.ts").unwrap();
let output = Command::new(util::deno_exe_path())
@@ -184,7 +184,7 @@ fn cache_test() {
#[test]
fn cache_invalidation_test() {
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let fixture_path = deno_dir.path().join("fixture.ts");
{
let mut file = std::fs::File::create(fixture_path.clone())
@@ -224,7 +224,7 @@ fn cache_invalidation_test() {
#[test]
fn cache_invalidation_test_no_check() {
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let fixture_path = deno_dir.path().join("fixture.ts");
{
let mut file = std::fs::File::create(fixture_path.clone())
@@ -266,7 +266,7 @@ fn cache_invalidation_test_no_check() {
#[test]
fn ts_dependency_recompilation() {
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new();
let ats = t.path().join("a.ts");
std::fs::write(
@@ -365,8 +365,8 @@ fn ts_reload() {
let hello_ts = util::testdata_path().join("002_hello.ts");
assert!(hello_ts.is_file());
- let deno_dir = TempDir::new().expect("tempdir fail");
- let mut initial = util::deno_cmd_with_deno_dir(deno_dir.path())
+ let deno_dir = TempDir::new();
+ let mut initial = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(util::testdata_path())
.arg("cache")
.arg(&hello_ts)
@@ -376,7 +376,7 @@ fn ts_reload() {
initial.wait().expect("failed to wait for child process");
assert!(status_initial.success());
- let output = util::deno_cmd_with_deno_dir(deno_dir.path())
+ let output = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(util::testdata_path())
.arg("cache")
.arg("--reload")
@@ -539,7 +539,7 @@ itest!(localhost_unsafe_ssl {
fn cafile_env_fetch() {
use deno_core::url::Url;
let _g = util::http_server();
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let module_url =
Url::parse("https://localhost:5545/cafile_url_imports.ts").unwrap();
let cafile = util::testdata_path().join("tls/RootCA.pem");
@@ -558,7 +558,7 @@ fn cafile_env_fetch() {
fn cafile_fetch() {
use deno_core::url::Url;
let _g = util::http_server();
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let module_url =
Url::parse("http://localhost:4545/cafile_url_imports.ts").unwrap();
let cafile = util::testdata_path().join("tls/RootCA.pem");
@@ -579,10 +579,10 @@ fn cafile_fetch() {
#[flaky_test::flaky_test]
fn cafile_install_remote_module() {
let _g = util::http_server();
- let temp_dir = TempDir::new().expect("tempdir fail");
+ let temp_dir = TempDir::new();
let bin_dir = temp_dir.path().join("bin");
std::fs::create_dir(&bin_dir).unwrap();
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let cafile = util::testdata_path().join("tls/RootCA.pem");
let install_output = Command::new(util::deno_exe_path())
@@ -625,7 +625,7 @@ fn cafile_bundle_remote_exports() {
// First we have to generate a bundle of some remote module that has exports.
let mod1 = "https://localhost:5545/subdir/mod1.ts";
let cafile = util::testdata_path().join("tls/RootCA.pem");
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new();
let bundle = t.path().join("mod1.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -1095,7 +1095,7 @@ fn typecheck_declarations_unstable() {
#[test]
fn typecheck_core() {
- let deno_dir = TempDir::new().expect("tempdir fail");
+ let deno_dir = TempDir::new();
let test_file = deno_dir.path().join("test_deno_core_types.ts");
std::fs::write(
&test_file,
@@ -1111,7 +1111,7 @@ fn typecheck_core() {
),
)
.unwrap();
- let output = util::deno_cmd_with_deno_dir(deno_dir.path())
+ let output = util::deno_cmd_with_deno_dir(&deno_dir)
.arg("run")
.arg(test_file.to_str().unwrap())
.output()