summaryrefslogtreecommitdiff
path: root/cli/tests/integration/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-14 19:05:16 +0100
committerGitHub <noreply@github.com>2022-01-14 19:05:16 +0100
commitdc58063d0032b7978f0cdd7b873bfc52a3b39830 (patch)
treef37d887130a154415f59d306e6654ec7d9b59541 /cli/tests/integration/mod.rs
parentcf2d2b7280881acf6d31840c47f942dbb7e9a3a4 (diff)
test: type check lib.deno_core.d.ts (#13356)
Diffstat (limited to 'cli/tests/integration/mod.rs')
-rw-r--r--cli/tests/integration/mod.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs
index 6321e86ad..3ab79f7df 100644
--- a/cli/tests/integration/mod.rs
+++ b/cli/tests/integration/mod.rs
@@ -1088,6 +1088,34 @@ fn typecheck_declarations_unstable() {
}
#[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()
.arg("lint")