summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-02-08 21:45:10 +1100
committerGitHub <noreply@github.com>2021-02-08 21:45:10 +1100
commite368c5d0f9d69e69438cb0a8a8deb49d7b02901a (patch)
treeb4375b56374f3aad19089e0f1016b1b892dc972c /cli/tests
parent09b79463d71f3b144a0cfd878108a012c87464ca (diff)
feat(lsp): add implementations code lens (#9441)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/lsp/code_lens_resolve_request_impl.json21
-rw-r--r--cli/tests/lsp/did_open_notification_cl_impl.json12
-rw-r--r--cli/tests/lsp/initialize_request.json1
3 files changed, 34 insertions, 0 deletions
diff --git a/cli/tests/lsp/code_lens_resolve_request_impl.json b/cli/tests/lsp/code_lens_resolve_request_impl.json
new file mode 100644
index 000000000..e44d19675
--- /dev/null
+++ b/cli/tests/lsp/code_lens_resolve_request_impl.json
@@ -0,0 +1,21 @@
+{
+ "jsonrpc": "2.0",
+ "id": 4,
+ "method": "codeLens/resolve",
+ "params": {
+ "range": {
+ "start": {
+ "line": 0,
+ "character": 10
+ },
+ "end": {
+ "line": 0,
+ "character": 11
+ }
+ },
+ "data": {
+ "specifier": "file:///a/file.ts",
+ "source": "implementations"
+ }
+ }
+}
diff --git a/cli/tests/lsp/did_open_notification_cl_impl.json b/cli/tests/lsp/did_open_notification_cl_impl.json
new file mode 100644
index 000000000..eabcd7ccc
--- /dev/null
+++ b/cli/tests/lsp/did_open_notification_cl_impl.json
@@ -0,0 +1,12 @@
+{
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts",
+ "languageId": "typescript",
+ "version": 1,
+ "text": "interface A {\n b(): void;\n}\n\nclass B implements A {\n b() {\n console.log(\"b\");\n }\n}\n"
+ }
+ }
+}
diff --git a/cli/tests/lsp/initialize_request.json b/cli/tests/lsp/initialize_request.json
index eaea00a18..21e9e3b4f 100644
--- a/cli/tests/lsp/initialize_request.json
+++ b/cli/tests/lsp/initialize_request.json
@@ -12,6 +12,7 @@
"initializationOptions": {
"enable": true,
"codeLens": {
+ "implementations": true,
"references": true
},
"lint": true,