1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 15:19:40 -05:00

tests(cli): check ignores dynamic import errors (#8323)

Closes #6618
This commit is contained in:
Kitson Kelly 2020-11-10 10:18:43 +11:00 committed by GitHub
parent c1fa8fbeba
commit 0982056ff6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View file

@ -1959,6 +1959,24 @@ pub mod tests {
assert_eq!(h.tsbuildinfo_calls.len(), 1);
}
#[tokio::test]
async fn test_graph_check_ignores_dynamic_import_errors() {
let specifier =
ModuleSpecifier::resolve_url_or_path("file:///tests/dynamicimport.ts")
.expect("could not resolve module");
let (graph, _) = setup(specifier).await;
let result_info = graph
.check(CheckOptions {
debug: false,
emit: false,
lib: TypeLib::DenoWindow,
maybe_config_path: None,
reload: false,
})
.expect("should have checked");
assert!(result_info.diagnostics.is_empty());
}
#[tokio::test]
async fn fix_graph_check_emit_diagnostics() {
let specifier =

View file

@ -0,0 +1,5 @@
try {
await import("bare_module_specifier");
} catch (err) {
console.log(err);
}