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:
parent
cf2d2b7280
commit
dc58063d00
1 changed files with 28 additions and 0 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue