summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests_lsp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration_tests_lsp.rs')
-rw-r--r--cli/tests/integration_tests_lsp.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/integration_tests_lsp.rs b/cli/tests/integration_tests_lsp.rs
index 1f58c0749..afc93764a 100644
--- a/cli/tests/integration_tests_lsp.rs
+++ b/cli/tests/integration_tests_lsp.rs
@@ -2734,3 +2734,31 @@ fn lsp_configuration_did_change() {
);
shutdown(&mut client);
}
+
+#[test]
+fn lsp_code_actions_ignore_lint() {
+ let mut client = init("initialize_params.json");
+ did_open(
+ &mut client,
+ json!({
+ "textDocument": {
+ "uri": "file:///a/file.ts",
+ "languageId": "typescript",
+ "version": 1,
+ "text": "let message = 'Hello, Deno!';\nconsole.log(message);\n"
+ }
+ }),
+ );
+ let (maybe_res, maybe_err) = client
+ .write_request(
+ "textDocument/codeAction",
+ load_fixture("code_action_ignore_lint_params.json"),
+ )
+ .unwrap();
+ assert!(maybe_err.is_none());
+ assert_eq!(
+ maybe_res,
+ Some(load_fixture("code_action_ignore_lint_response.json"))
+ );
+ shutdown(&mut client);
+}