diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs index 6321e86ad6..3ab79f7df2 100644 --- a/cli/tests/integration/mod.rs +++ b/cli/tests/integration/mod.rs @@ -1087,6 +1087,34 @@ fn typecheck_declarations_unstable() { assert!(output.status.success()); } +#[test] +fn typecheck_core() { + let deno_dir = TempDir::new().expect("tempdir fail"); + let test_file = deno_dir.path().join("test_deno_core_types.ts"); + std::fs::write( + &test_file, + format!( + "import \"{}\";", + deno_core::resolve_path( + util::root_path() + .join("core/lib.deno_core.d.ts") + .to_str() + .unwrap() + ) + .unwrap() + ), + ) + .unwrap(); + let output = util::deno_cmd_with_deno_dir(deno_dir.path()) + .arg("run") + .arg(test_file.to_str().unwrap()) + .output() + .unwrap(); + println!("stdout: {}", String::from_utf8(output.stdout).unwrap()); + println!("stderr: {}", String::from_utf8(output.stderr).unwrap()); + assert!(output.status.success()); +} + #[test] fn js_unit_tests_lint() { let status = util::deno_cmd()