summaryrefslogtreecommitdiff
path: root/cli/tests/lsp
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/lsp')
-rw-r--r--cli/tests/lsp/did_open_notification.json12
-rw-r--r--cli/tests/lsp/exit_notification.json5
-rw-r--r--cli/tests/lsp/hover_request.json14
-rw-r--r--cli/tests/lsp/initialize_request.json23
-rw-r--r--cli/tests/lsp/initialized_notification.json5
-rw-r--r--cli/tests/lsp/shutdown_request.json6
6 files changed, 65 insertions, 0 deletions
diff --git a/cli/tests/lsp/did_open_notification.json b/cli/tests/lsp/did_open_notification.json
new file mode 100644
index 000000000..04f12a7b3
--- /dev/null
+++ b/cli/tests/lsp/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": "console.log(Deno.args);\n"
+ }
+ }
+}
diff --git a/cli/tests/lsp/exit_notification.json b/cli/tests/lsp/exit_notification.json
new file mode 100644
index 000000000..799a0d1d5
--- /dev/null
+++ b/cli/tests/lsp/exit_notification.json
@@ -0,0 +1,5 @@
+{
+ "jsonrpc": "2.0",
+ "method": "exit",
+ "params": null
+}
diff --git a/cli/tests/lsp/hover_request.json b/cli/tests/lsp/hover_request.json
new file mode 100644
index 000000000..f12bd52df
--- /dev/null
+++ b/cli/tests/lsp/hover_request.json
@@ -0,0 +1,14 @@
+{
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "textDocument/hover",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ },
+ "position": {
+ "line": 0,
+ "character": 19
+ }
+ }
+}
diff --git a/cli/tests/lsp/initialize_request.json b/cli/tests/lsp/initialize_request.json
new file mode 100644
index 000000000..960420bfd
--- /dev/null
+++ b/cli/tests/lsp/initialize_request.json
@@ -0,0 +1,23 @@
+{
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "initialize",
+ "params": {
+ "processId": 0,
+ "clientInfo": {
+ "name": "test-harness",
+ "version": "1.0.0"
+ },
+ "rootUri": null,
+ "capabilities": {
+ "textDocument": {
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ }
+ }
+ }
+ }
+}
diff --git a/cli/tests/lsp/initialized_notification.json b/cli/tests/lsp/initialized_notification.json
new file mode 100644
index 000000000..972f8abc8
--- /dev/null
+++ b/cli/tests/lsp/initialized_notification.json
@@ -0,0 +1,5 @@
+{
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+}
diff --git a/cli/tests/lsp/shutdown_request.json b/cli/tests/lsp/shutdown_request.json
new file mode 100644
index 000000000..fd4d78460
--- /dev/null
+++ b/cli/tests/lsp/shutdown_request.json
@@ -0,0 +1,6 @@
+{
+ "jsonrpc": "2.0",
+ "id": 3,
+ "method": "shutdown",
+ "params": null
+}