diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-06-26 22:23:25 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-26 08:23:25 -0400 |
commit | 70463bac7d0327027f4650e3b4ab810e76604e2b (patch) | |
tree | 03ba8bea5f6bb7cafceeac3cf6deda4d804442c9 /cli/tests | |
parent | 4817c153e47975b0b4390ec41b68240c4257f599 (diff) |
fix: Omit buildinfo when --reload passed (#6489)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration_tests.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index b4bc47e08..239d1ca52 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -611,6 +611,37 @@ fn ts_dependency_recompilation() { } #[test] +fn ts_reload() { + let hello_ts = util::root_path().join("cli/tests/002_hello.ts"); + assert!(hello_ts.is_file()); + let mut initial = util::deno_cmd() + .current_dir(util::root_path()) + .arg("cache") + .arg("--reload") + .arg(hello_ts.clone()) + .spawn() + .expect("failed to spawn script"); + let status_initial = + initial.wait().expect("failed to wait for child process"); + assert!(status_initial.success()); + + let output = util::deno_cmd() + .current_dir(util::root_path()) + .arg("cache") + .arg("--reload") + .arg("-L") + .arg("debug") + .arg(hello_ts) + .output() + .expect("failed to spawn script"); + // check the output of the the bundle program. + assert!(std::str::from_utf8(&output.stdout) + .unwrap() + .trim() + .contains("compiler::host.writeFile deno://002_hello.js")); +} + +#[test] fn bundle_exports() { // First we have to generate a bundle of some module that has exports. let mod1 = util::root_path().join("cli/tests/subdir/mod1.ts"); |