diff options
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r-- | cli/tests/integration_tests.rs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 94d410dcc..4b1b67f7f 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -950,6 +950,38 @@ fn bundle_import_map() { } #[test] +fn info_with_compiled_source() { + let _g = util::http_server(); + let module_path = "http://127.0.0.1:4545/cli/tests/048_media_types_jsx.ts"; + let t = TempDir::new().expect("tempdir fail"); + + let mut deno = util::deno_cmd() + .env("DENO_DIR", t.path()) + .current_dir(util::root_path()) + .arg("cache") + .arg(&module_path) + .spawn() + .expect("failed to spawn script"); + let status = deno.wait().expect("failed to wait for the child process"); + assert!(status.success()); + + let output = util::deno_cmd() + .env("DENO_DIR", t.path()) + .env("NO_COLOR", "1") + .current_dir(util::root_path()) + .arg("info") + .arg(&module_path) + .output() + .expect("failed to spawn script"); + + let str_output = std::str::from_utf8(&output.stdout).unwrap().trim(); + eprintln!("{}", str_output); + // check the output of the test.ts program. + assert!(str_output.contains("compiled: ")); + assert_eq!(output.stderr, b""); +} + +#[test] fn repl_test_console_log() { let (out, err) = util::run_and_collect_output( true, @@ -2289,6 +2321,12 @@ itest!(import_file_with_colon { http_server: true, }); +itest!(info_recursive_modules { + args: "info --quiet info_recursive_imports_test.ts", + output: "info_recursive_imports_test.out", + exit_code: 0, +}); + itest!(info_type_import { args: "info info_type_import.ts", output: "info_type_import.out", |