summaryrefslogtreecommitdiff
path: root/cli/tests/integration/bundle_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration/bundle_tests.rs')
-rw-r--r--cli/tests/integration/bundle_tests.rs98
1 files changed, 49 insertions, 49 deletions
diff --git a/cli/tests/integration/bundle_tests.rs b/cli/tests/integration/bundle_tests.rs
index 36ea1f8dd..e6d208897 100644
--- a/cli/tests/integration/bundle_tests.rs
+++ b/cli/tests/integration/bundle_tests.rs
@@ -9,7 +9,7 @@ fn bundle_exports() {
// First we have to generate a bundle of some module that has exports.
let mod1 = util::testdata_path().join("subdir/mod1.ts");
assert!(mod1.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("mod1.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -17,8 +17,8 @@ fn bundle_exports() {
.arg(mod1)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -30,14 +30,14 @@ fn bundle_exports() {
import { printHello3 } from \"./mod1.bundle.js\";
printHello3(); ",
)
- .expect("error writing file");
+ .unwrap();
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
.arg(&test)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the test.ts program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -51,7 +51,7 @@ fn bundle_exports_no_check() {
// First we have to generate a bundle of some module that has exports.
let mod1 = util::testdata_path().join("subdir/mod1.ts");
assert!(mod1.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("mod1.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -60,8 +60,8 @@ fn bundle_exports_no_check() {
.arg(mod1)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -73,14 +73,14 @@ fn bundle_exports_no_check() {
import { printHello3 } from \"./mod1.bundle.js\";
printHello3(); ",
)
- .expect("error writing file");
+ .unwrap();
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
.arg(&test)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the test.ts program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -94,7 +94,7 @@ fn bundle_circular() {
// First we have to generate a bundle of some module that has exports.
let circular1 = util::testdata_path().join("subdir/circular1.ts");
assert!(circular1.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("circular1.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -102,8 +102,8 @@ fn bundle_circular() {
.arg(circular1)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -112,7 +112,7 @@ fn bundle_circular() {
.arg("run")
.arg(&bundle)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the the bundle program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -126,7 +126,7 @@ fn bundle_single_module() {
// First we have to generate a bundle of some module that has exports.
let single_module = util::testdata_path().join("subdir/single_module.ts");
assert!(single_module.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("single_module.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -134,8 +134,8 @@ fn bundle_single_module() {
.arg(single_module)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -144,7 +144,7 @@ fn bundle_single_module() {
.arg("run")
.arg(&bundle)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the the bundle program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -158,7 +158,7 @@ fn bundle_tla() {
// First we have to generate a bundle of some module that has exports.
let tla_import = util::testdata_path().join("subdir/tla.ts");
assert!(tla_import.is_file());
- let t = tempfile::TempDir::new().expect("tempdir fail");
+ let t = tempfile::TempDir::new().unwrap();
let bundle = t.path().join("tla.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -166,8 +166,8 @@ fn bundle_tla() {
.arg(tla_import)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -179,14 +179,14 @@ fn bundle_tla() {
import { foo } from \"./tla.bundle.js\";
console.log(foo); ",
)
- .expect("error writing file");
+ .unwrap();
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
.arg(&test)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the test.ts program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -200,7 +200,7 @@ fn bundle_js() {
// First we have to generate a bundle of some module that has exports.
let mod6 = util::testdata_path().join("subdir/mod6.js");
assert!(mod6.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("mod6.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -208,8 +208,8 @@ fn bundle_js() {
.arg(mod6)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -218,7 +218,7 @@ fn bundle_js() {
.arg("run")
.arg(&bundle)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check that nothing went to stderr
assert_eq!(output.stderr, b"");
}
@@ -228,7 +228,7 @@ fn bundle_dynamic_import() {
let _g = util::http_server();
let dynamic_import = util::testdata_path().join("bundle_dynamic_import.ts");
assert!(dynamic_import.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("bundle_dynamic_import.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -236,8 +236,8 @@ fn bundle_dynamic_import() {
.arg(dynamic_import)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -248,7 +248,7 @@ fn bundle_dynamic_import() {
.arg("--quiet")
.arg(&bundle)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the test.ts program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -262,7 +262,7 @@ fn bundle_import_map() {
let import = util::testdata_path().join("bundle_im.ts");
let import_map_path = util::testdata_path().join("bundle_im.json");
assert!(import.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("import_map.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -272,8 +272,8 @@ fn bundle_import_map() {
.arg(import)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -285,14 +285,14 @@ fn bundle_import_map() {
import { printHello3 } from \"./import_map.bundle.js\";
printHello3(); ",
)
- .expect("error writing file");
+ .unwrap();
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
.arg(&test)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the test.ts program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -306,7 +306,7 @@ fn bundle_import_map_no_check() {
let import = util::testdata_path().join("bundle_im.ts");
let import_map_path = util::testdata_path().join("bundle_im.json");
assert!(import.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("import_map.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -317,8 +317,8 @@ fn bundle_import_map_no_check() {
.arg(import)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -330,14 +330,14 @@ fn bundle_import_map_no_check() {
import { printHello3 } from \"./import_map.bundle.js\";
printHello3(); ",
)
- .expect("error writing file");
+ .unwrap();
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
.arg(&test)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check the output of the test.ts program.
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
@@ -351,7 +351,7 @@ fn bundle_json_module() {
// First we have to generate a bundle of some module that has exports.
let mod7 = util::testdata_path().join("subdir/mod7.js");
assert!(mod7.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("mod7.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -359,8 +359,8 @@ fn bundle_json_module() {
.arg(mod7)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -369,7 +369,7 @@ fn bundle_json_module() {
.arg("run")
.arg(&bundle)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check that nothing went to stderr
assert_eq!(output.stderr, b"");
// ensure the output looks right
@@ -383,7 +383,7 @@ fn bundle_json_module_escape_sub() {
// First we have to generate a bundle of some module that has exports.
let mod8 = util::testdata_path().join("subdir/mod8.js");
assert!(mod8.is_file());
- let t = TempDir::new().expect("tempdir fail");
+ let t = TempDir::new().unwrap();
let bundle = t.path().join("mod8.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
@@ -391,8 +391,8 @@ fn bundle_json_module_escape_sub() {
.arg(mod8)
.arg(&bundle)
.spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
+ .unwrap();
+ let status = deno.wait().unwrap();
assert!(status.success());
assert!(bundle.is_file());
@@ -401,7 +401,7 @@ fn bundle_json_module_escape_sub() {
.arg("run")
.arg(&bundle)
.output()
- .expect("failed to spawn script");
+ .unwrap();
// check that nothing went to stderr
assert_eq!(output.stderr, b"");
// make sure the output looks right and the escapes were effective