diff options
Diffstat (limited to 'cli/tests/integration/lsp_tests.rs')
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index ca4b77f4d..11cb09994 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -7734,6 +7734,49 @@ fn lsp_diagnostics_refresh_dependents() { assert_eq!(client.queue_len(), 0); } +#[test] +fn lsp_jupyter_diagnostics() { + let context = TestContextBuilder::new().use_temp_cwd().build(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + let diagnostics = client.did_open(json!({ + "textDocument": { + "uri": "deno-notebook-cell:/a/file.ts#abc", + "languageId": "typescript", + "version": 1, + "text": "Deno.readTextFileSync(1234);", + }, + })); + assert_eq!( + json!(diagnostics.all_messages()), + json!([ + { + "uri": "deno-notebook-cell:/a/file.ts#abc", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 22, + }, + "end": { + "line": 0, + "character": 26, + }, + }, + "severity": 1, + "code": 2345, + "source": "deno-ts", + "message": "Argument of type 'number' is not assignable to parameter of type 'string | URL'.", + }, + ], + "version": 1, + }, + ]) + ); + client.shutdown(); +} + #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PerformanceAverage { @@ -9504,7 +9547,7 @@ fn lsp_data_urls_with_jsx_compiler_option() { "end": { "line": 1, "character": 1 } } }, { - "uri": "deno:/5c42b5916c4a3fb55be33fdb0c3b1f438639420592d150fca1b6dc043c1df3d9/data_url.ts", + "uri": "deno:/ed0224c51f7e2a845dfc0941ed6959675e5e3e3d2a39b127f0ff569c1ffda8d8/data_url.ts", "range": { "start": { "line": 0, "character": 7 }, "end": {"line": 0, "character": 14 }, |