2022-01-07 22:09:52 -05:00
|
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
use crate::itest;
|
|
|
|
use test_util as util;
|
2022-04-01 11:15:37 -04:00
|
|
|
use test_util::TempDir;
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_exports() {
|
|
|
|
// First we have to generate a bundle of some module that has exports.
|
2021-08-11 10:20:47 -04:00
|
|
|
let mod1 = util::testdata_path().join("subdir/mod1.ts");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(mod1.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("mod1.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(mod1)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
// Now we try to use that bundle from another module.
|
|
|
|
let test = t.path().join("test.js");
|
|
|
|
std::fs::write(
|
|
|
|
&test,
|
|
|
|
"
|
|
|
|
import { printHello3 } from \"./mod1.bundle.js\";
|
|
|
|
printHello3(); ",
|
|
|
|
)
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&test)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the test.ts program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_exports_no_check() {
|
|
|
|
// First we have to generate a bundle of some module that has exports.
|
2021-08-11 10:20:47 -04:00
|
|
|
let mod1 = util::testdata_path().join("subdir/mod1.ts");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(mod1.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("mod1.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(mod1)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
// Now we try to use that bundle from another module.
|
|
|
|
let test = t.path().join("test.js");
|
|
|
|
std::fs::write(
|
|
|
|
&test,
|
|
|
|
"
|
|
|
|
import { printHello3 } from \"./mod1.bundle.js\";
|
|
|
|
printHello3(); ",
|
|
|
|
)
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&test)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the test.ts program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_circular() {
|
|
|
|
// First we have to generate a bundle of some module that has exports.
|
2021-08-11 10:20:47 -04:00
|
|
|
let circular1 = util::testdata_path().join("subdir/circular1.ts");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(circular1.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("circular1.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(circular1)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&bundle)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the the bundle program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("f2\nf1"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_single_module() {
|
|
|
|
// First we have to generate a bundle of some module that has exports.
|
2021-08-11 10:20:47 -04:00
|
|
|
let single_module = util::testdata_path().join("subdir/single_module.ts");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(single_module.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("single_module.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(single_module)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&bundle)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the the bundle program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello world!"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_tla() {
|
|
|
|
// First we have to generate a bundle of some module that has exports.
|
2021-08-11 10:20:47 -04:00
|
|
|
let tla_import = util::testdata_path().join("subdir/tla.ts");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(tla_import.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("tla.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(tla_import)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
// Now we try to use that bundle from another module.
|
|
|
|
let test = t.path().join("test.js");
|
|
|
|
std::fs::write(
|
|
|
|
&test,
|
|
|
|
"
|
|
|
|
import { foo } from \"./tla.bundle.js\";
|
|
|
|
console.log(foo); ",
|
|
|
|
)
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&test)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the test.ts program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_js() {
|
|
|
|
// First we have to generate a bundle of some module that has exports.
|
2021-08-11 10:20:47 -04:00
|
|
|
let mod6 = util::testdata_path().join("subdir/mod6.js");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(mod6.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("mod6.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(mod6)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&bundle)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check that nothing went to stderr
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_dynamic_import() {
|
|
|
|
let _g = util::http_server();
|
2021-08-11 10:20:47 -04:00
|
|
|
let dynamic_import = util::testdata_path().join("bundle_dynamic_import.ts");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(dynamic_import.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("bundle_dynamic_import.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg(dynamic_import)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg("--allow-net")
|
|
|
|
.arg("--quiet")
|
|
|
|
.arg(&bundle)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the test.ts program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_import_map() {
|
2021-08-11 10:20:47 -04:00
|
|
|
let import = util::testdata_path().join("bundle_im.ts");
|
|
|
|
let import_map_path = util::testdata_path().join("bundle_im.json");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(import.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("import_map.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg("--import-map")
|
|
|
|
.arg(import_map_path)
|
|
|
|
.arg(import)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
// Now we try to use that bundle from another module.
|
|
|
|
let test = t.path().join("test.js");
|
|
|
|
std::fs::write(
|
|
|
|
&test,
|
|
|
|
"
|
|
|
|
import { printHello3 } from \"./import_map.bundle.js\";
|
|
|
|
printHello3(); ",
|
|
|
|
)
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
2022-04-10 19:12:51 -04:00
|
|
|
.arg("--check")
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg(&test)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the test.ts program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bundle_import_map_no_check() {
|
2021-08-11 10:20:47 -04:00
|
|
|
let import = util::testdata_path().join("bundle_im.ts");
|
|
|
|
let import_map_path = util::testdata_path().join("bundle_im.json");
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(import.is_file());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-06-27 13:27:36 -04:00
|
|
|
let bundle = t.path().join("import_map.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("bundle")
|
|
|
|
.arg("--import-map")
|
|
|
|
.arg(import_map_path)
|
|
|
|
.arg(import)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
// Now we try to use that bundle from another module.
|
|
|
|
let test = t.path().join("test.js");
|
|
|
|
std::fs::write(
|
|
|
|
&test,
|
|
|
|
"
|
|
|
|
import { printHello3 } from \"./import_map.bundle.js\";
|
|
|
|
printHello3(); ",
|
|
|
|
)
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
2021-08-11 10:20:47 -04:00
|
|
|
.current_dir(util::testdata_path())
|
2021-06-27 13:27:36 -04:00
|
|
|
.arg("run")
|
|
|
|
.arg(&test)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-06-27 13:27:36 -04:00
|
|
|
// check the output of the test.ts program.
|
|
|
|
assert!(std::str::from_utf8(&output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.trim()
|
|
|
|
.ends_with("Hello"));
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
}
|
|
|
|
|
2021-12-23 17:38:20 -05:00
|
|
|
#[test]
|
|
|
|
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());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-12-23 17:38:20 -05:00
|
|
|
let bundle = t.path().join("mod7.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
|
|
|
.current_dir(util::testdata_path())
|
|
|
|
.arg("bundle")
|
|
|
|
.arg(mod7)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-12-23 17:38:20 -05:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
|
|
|
.current_dir(util::testdata_path())
|
|
|
|
.arg("run")
|
|
|
|
.arg(&bundle)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-12-23 17:38:20 -05:00
|
|
|
// check that nothing went to stderr
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
// ensure the output looks right
|
|
|
|
assert!(String::from_utf8(output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.contains("with space"));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
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());
|
2022-04-01 11:15:37 -04:00
|
|
|
let t = TempDir::new();
|
2021-12-23 17:38:20 -05:00
|
|
|
let bundle = t.path().join("mod8.bundle.js");
|
|
|
|
let mut deno = util::deno_cmd()
|
|
|
|
.current_dir(util::testdata_path())
|
|
|
|
.arg("bundle")
|
|
|
|
.arg(mod8)
|
|
|
|
.arg(&bundle)
|
|
|
|
.spawn()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
|
|
|
let status = deno.wait().unwrap();
|
2021-12-23 17:38:20 -05:00
|
|
|
assert!(status.success());
|
|
|
|
assert!(bundle.is_file());
|
|
|
|
|
|
|
|
let output = util::deno_cmd()
|
|
|
|
.current_dir(util::testdata_path())
|
|
|
|
.arg("run")
|
|
|
|
.arg(&bundle)
|
|
|
|
.output()
|
2022-03-22 15:10:00 -04:00
|
|
|
.unwrap();
|
2021-12-23 17:38:20 -05:00
|
|
|
// check that nothing went to stderr
|
|
|
|
assert_eq!(output.stderr, b"");
|
|
|
|
// make sure the output looks right and the escapes were effective
|
|
|
|
assert!(String::from_utf8(output.stdout)
|
|
|
|
.unwrap()
|
|
|
|
.contains("${globalThis}`and string literal`"));
|
|
|
|
}
|
|
|
|
|
2021-06-27 13:27:36 -04:00
|
|
|
itest!(lock_check_err_with_bundle {
|
2021-08-11 10:20:47 -04:00
|
|
|
args: "bundle --lock=lock_check_err_with_bundle.json http://127.0.0.1:4545/subdir/mod1.ts",
|
2021-06-27 13:27:36 -04:00
|
|
|
output: "lock_check_err_with_bundle.out",
|
|
|
|
exit_code: 10,
|
|
|
|
http_server: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
itest!(bundle {
|
|
|
|
args: "bundle subdir/mod1.ts",
|
|
|
|
output: "bundle.test.out",
|
|
|
|
});
|
|
|
|
|
|
|
|
itest!(bundle_jsx {
|
|
|
|
args: "bundle jsx_import_from_ts.ts",
|
|
|
|
output: "bundle_jsx.out",
|
|
|
|
});
|
|
|
|
|
|
|
|
itest!(error_027_bundle_with_bare_import {
|
|
|
|
args: "bundle error_027_bundle_with_bare_import.ts",
|
|
|
|
output: "error_027_bundle_with_bare_import.ts.out",
|
|
|
|
exit_code: 1,
|
|
|
|
});
|
|
|
|
|
|
|
|
itest!(ts_decorators_bundle {
|
|
|
|
args: "bundle ts_decorators_bundle.ts",
|
|
|
|
output: "ts_decorators_bundle.out",
|
|
|
|
});
|
2021-10-13 08:55:28 -04:00
|
|
|
|
|
|
|
itest!(bundle_export_specifier_with_alias {
|
|
|
|
args: "bundle bundle/file_tests-fixture16.ts",
|
|
|
|
output: "bundle/fixture16.out",
|
|
|
|
});
|
2022-01-12 07:05:06 -05:00
|
|
|
|
|
|
|
itest!(bundle_ignore_directives {
|
|
|
|
args: "bundle subdir/mod1.ts",
|
|
|
|
output: "bundle_ignore_directives.test.out",
|
|
|
|
});
|
2022-05-17 17:53:42 -04:00
|
|
|
|
|
|
|
itest!(check_local_by_default {
|
|
|
|
args: "bundle --quiet bundle/check_local_by_default.ts",
|
|
|
|
output: "bundle/check_local_by_default.out",
|
|
|
|
http_server: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
itest!(check_local_by_default2 {
|
|
|
|
args: "bundle --quiet bundle/check_local_by_default2.ts",
|
|
|
|
output: "bundle/check_local_by_default2.out",
|
|
|
|
http_server: true,
|
|
|
|
exit_code: 1,
|
|
|
|
});
|