diff options
Diffstat (limited to 'cli/tests/integration/lsp_tests.rs')
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 665fa6275..218b1db40 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -8549,6 +8549,32 @@ Deno.test({ _ => panic!("unexpected message {}", json!(notification)), } + // Regression test for https://github.com/denoland/vscode_deno/issues/899. + temp_dir.write("./test.ts", ""); + client.write_notification( + "textDocument/didChange", + json!({ + "textDocument": { + "uri": temp_dir.uri().join("test.ts").unwrap(), + "version": 2 + }, + "contentChanges": [{ "text": "" }], + }), + ); + + assert_eq!(client.read_diagnostics().all().len(), 0); + + let (method, notification) = client.read_notification::<Value>(); + assert_eq!(method, "deno/testModuleDelete"); + assert_eq!( + notification, + Some(json!({ + "textDocument": { + "uri": temp_dir.uri().join("test.ts").unwrap() + } + })) + ); + client.shutdown(); } |