summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorJean Pierre <jeanp413@hotmail.com>2021-03-23 18:33:25 -0500
committerGitHub <noreply@github.com>2021-03-24 10:33:25 +1100
commit77cfadf5321df90ea5fd625e2eb9d51b3920b437 (patch)
tree3bb56c344fd7cf5edc1516b78673ae1f35209d1e /cli/tests
parentb233985feacb6a869e491e28474faa936dc07538 (diff)
feat(lsp): implement textDocument/selectionRange (#9845)
Ref: #8643
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/lsp/selection_range_did_open_notification.json12
-rw-r--r--cli/tests/lsp/selection_range_request.json16
2 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/lsp/selection_range_did_open_notification.json b/cli/tests/lsp/selection_range_did_open_notification.json
new file mode 100644
index 000000000..a6b3d9d39
--- /dev/null
+++ b/cli/tests/lsp/selection_range_did_open_notification.json
@@ -0,0 +1,12 @@
+{
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts",
+ "languageId": "typescript",
+ "version": 1,
+ "text": "class Foo {\n bar(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n }\n}"
+ }
+ }
+}
diff --git a/cli/tests/lsp/selection_range_request.json b/cli/tests/lsp/selection_range_request.json
new file mode 100644
index 000000000..5125fa6a0
--- /dev/null
+++ b/cli/tests/lsp/selection_range_request.json
@@ -0,0 +1,16 @@
+{
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "textDocument/selectionRange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ },
+ "positions": [
+ {
+ "line": 2,
+ "character": 8
+ }
+ ]
+ }
+}