diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-02-06 14:56:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 14:56:26 +0000 |
commit | 327b5b280b3914fffb5dc89019e4adfefa2b9eb5 (patch) | |
tree | 6114a94e3011f3a6ab3831fdf1ffdfe8a8362441 /cli/tests | |
parent | 7c111da5f698b20db4db9e7fc02463f401c081db (diff) |
fix(lsp): disable no-cache diagnostics for jsr specifiers (#22284)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 3de8802fa..c9abae241 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -4658,6 +4658,29 @@ fn lsp_code_actions_deno_cache() { } #[test] +fn lsp_jsr_uncached() { + let context = TestContextBuilder::new() + .use_http_server() + .use_temp_cwd() + .build(); + let temp_dir = context.temp_dir(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + let diagnostics = client.did_open(json!({ + "textDocument": { + "uri": temp_dir.uri().join("file.ts").unwrap(), + "languageId": "typescript", + "version": 1, + "text": r#"import "jsr:@foo/bar";"#, + }, + })); + // TODO(nayeemrmn): This should check if the jsr dep is cached and give a + // diagnostic. + assert_eq!(json!(diagnostics.all()), json!([])); + client.shutdown(); +} + +#[test] fn lsp_code_actions_deno_cache_npm() { let context = TestContextBuilder::new().use_temp_cwd().build(); let mut client = context.new_lsp_command().build(); |