1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

test: type check lib.deno_core.d.ts (#13356)

This commit is contained in:
Bartek Iwańczuk 2022-01-14 19:05:16 +01:00 committed by GitHub
parent cf2d2b7280
commit dc58063d00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1087,6 +1087,34 @@ fn typecheck_declarations_unstable() {
assert!(output.status.success()); 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] #[test]
fn js_unit_tests_lint() { fn js_unit_tests_lint() {
let status = util::deno_cmd() let status = util::deno_cmd()