From 70463bac7d0327027f4650e3b4ab810e76604e2b Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 26 Jun 2020 22:23:25 +1000 Subject: fix: Omit buildinfo when --reload passed (#6489) --- cli/tests/integration_tests.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'cli/tests') 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 @@ -610,6 +610,37 @@ fn ts_dependency_recompilation() { assert!(stdout_output.is_empty()); } +#[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. -- cgit v1.2.3