summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/lsp/signature_help_did_change_notification.json25
-rw-r--r--cli/tests/lsp/signature_help_did_open_notification.json12
-rw-r--r--cli/tests/lsp/signature_help_request_01.json19
-rw-r--r--cli/tests/lsp/signature_help_request_02.json14
4 files changed, 70 insertions, 0 deletions
diff --git a/cli/tests/lsp/signature_help_did_change_notification.json b/cli/tests/lsp/signature_help_did_change_notification.json
new file mode 100644
index 000000000..f88eaa9ff
--- /dev/null
+++ b/cli/tests/lsp/signature_help_did_change_notification.json
@@ -0,0 +1,25 @@
+{
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts",
+ "version": 2
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 9,
+ "character": 4
+ },
+ "end": {
+ "line": 9,
+ "character": 4
+ }
+ },
+ "text": "123, "
+ }
+ ]
+ }
+}
diff --git a/cli/tests/lsp/signature_help_did_open_notification.json b/cli/tests/lsp/signature_help_did_open_notification.json
new file mode 100644
index 000000000..1ba1f7586
--- /dev/null
+++ b/cli/tests/lsp/signature_help_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": "/**\n * Adds two numbers.\n * @param a This is a first number.\n * @param b This is a second number.\n */\nfunction add(a: number, b: number) {\n return a + b;\n}\n\nadd("
+ }
+ }
+}
diff --git a/cli/tests/lsp/signature_help_request_01.json b/cli/tests/lsp/signature_help_request_01.json
new file mode 100644
index 000000000..c3e185e08
--- /dev/null
+++ b/cli/tests/lsp/signature_help_request_01.json
@@ -0,0 +1,19 @@
+{
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "textDocument/signatureHelp",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ },
+ "position": {
+ "character": 4,
+ "line": 9
+ },
+ "context": {
+ "triggerKind": 2,
+ "triggerCharacter": "(",
+ "isRetrigger": false
+ }
+ }
+}
diff --git a/cli/tests/lsp/signature_help_request_02.json b/cli/tests/lsp/signature_help_request_02.json
new file mode 100644
index 000000000..c2a6e0abb
--- /dev/null
+++ b/cli/tests/lsp/signature_help_request_02.json
@@ -0,0 +1,14 @@
+{
+ "id": 2,
+ "jsonrpc": "2.0",
+ "method": "textDocument/signatureHelp",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ },
+ "position": {
+ "character": 8,
+ "line": 9
+ }
+ }
+}