summaryrefslogtreecommitdiff
path: root/cli/tests/integration/lsp_tests.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-08-29 09:43:11 +0100
committerGitHub <noreply@github.com>2023-08-29 09:43:11 +0100
commitc31c93ce70c1147872d911c4a05c808d4078339b (patch)
tree3daa86a2d283982eab65748c6defeb675b9be026 /cli/tests/integration/lsp_tests.rs
parentfb7092fb43d5a6e5a29ca5b2f0de6683ee55f3e5 (diff)
fix(lsp): delete test modules with all tests deleted (#20321)
Fixes https://github.com/denoland/vscode_deno/issues/899.
Diffstat (limited to 'cli/tests/integration/lsp_tests.rs')
-rw-r--r--cli/tests/integration/lsp_tests.rs26
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();
}