summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/lsp/incoming_calls_request.json33
-rw-r--r--cli/tests/lsp/outgoing_calls_request.json33
-rw-r--r--cli/tests/lsp/prepare_call_hierarchy_did_open_notification.json12
-rw-r--r--cli/tests/lsp/prepare_call_hierarchy_request.json14
4 files changed, 92 insertions, 0 deletions
diff --git a/cli/tests/lsp/incoming_calls_request.json b/cli/tests/lsp/incoming_calls_request.json
new file mode 100644
index 000000000..47af92c1b
--- /dev/null
+++ b/cli/tests/lsp/incoming_calls_request.json
@@ -0,0 +1,33 @@
+{
+ "jsonrpc": "2.0",
+ "id": 4,
+ "method": "callHierarchy/incomingCalls",
+ "params": {
+ "item": {
+ "name": "baz",
+ "kind": 6,
+ "detail": "Bar",
+ "uri": "file:///a/file.ts",
+ "range": {
+ "start": {
+ "line": 5,
+ "character": 2
+ },
+ "end": {
+ "line": 7,
+ "character": 3
+ }
+ },
+ "selectionRange": {
+ "start": {
+ "line": 5,
+ "character": 2
+ },
+ "end": {
+ "line": 5,
+ "character": 5
+ }
+ }
+ }
+ }
+}
diff --git a/cli/tests/lsp/outgoing_calls_request.json b/cli/tests/lsp/outgoing_calls_request.json
new file mode 100644
index 000000000..a8d224ae8
--- /dev/null
+++ b/cli/tests/lsp/outgoing_calls_request.json
@@ -0,0 +1,33 @@
+{
+ "jsonrpc": "2.0",
+ "id": 5,
+ "method": "callHierarchy/outgoingCalls",
+ "params": {
+ "item": {
+ "name": "baz",
+ "kind": 6,
+ "detail": "Bar",
+ "uri": "file:///a/file.ts",
+ "range": {
+ "start": {
+ "line": 5,
+ "character": 2
+ },
+ "end": {
+ "line": 7,
+ "character": 3
+ }
+ },
+ "selectionRange": {
+ "start": {
+ "line": 5,
+ "character": 2
+ },
+ "end": {
+ "line": 5,
+ "character": 5
+ }
+ }
+ }
+ }
+}
diff --git a/cli/tests/lsp/prepare_call_hierarchy_did_open_notification.json b/cli/tests/lsp/prepare_call_hierarchy_did_open_notification.json
new file mode 100644
index 000000000..a75bd3a53
--- /dev/null
+++ b/cli/tests/lsp/prepare_call_hierarchy_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": "function foo() {\n return false;\n}\n\nclass Bar {\n baz() {\n return foo();\n }\n}\n\nfunction main() {\n const bar = new Bar();\n bar.baz();\n}\n\nmain();"
+ }
+ }
+}
diff --git a/cli/tests/lsp/prepare_call_hierarchy_request.json b/cli/tests/lsp/prepare_call_hierarchy_request.json
new file mode 100644
index 000000000..1f469ee8b
--- /dev/null
+++ b/cli/tests/lsp/prepare_call_hierarchy_request.json
@@ -0,0 +1,14 @@
+{
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "textDocument/prepareCallHierarchy",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ },
+ "position": {
+ "line": 5,
+ "character": 3
+ }
+ }
+}