summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/lsp/semantic_tokens_did_open_notification.json12
-rw-r--r--cli/tests/lsp/semantic_tokens_full_request.json10
-rw-r--r--cli/tests/lsp/semantic_tokens_range_request.json20
3 files changed, 42 insertions, 0 deletions
diff --git a/cli/tests/lsp/semantic_tokens_did_open_notification.json b/cli/tests/lsp/semantic_tokens_did_open_notification.json
new file mode 100644
index 000000000..3bf1f6c44
--- /dev/null
+++ b/cli/tests/lsp/semantic_tokens_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": "enum Values { value1, value2 }\n\nasync function baz(s: string): Promise<string> {\n const r = s.slice(0);\n return r;\n}\n\ninterface IFoo {\n readonly x: number;\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public readonly x: number) { }\n foo() { return true; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n"
+ }
+ }
+}
diff --git a/cli/tests/lsp/semantic_tokens_full_request.json b/cli/tests/lsp/semantic_tokens_full_request.json
new file mode 100644
index 000000000..748cc4382
--- /dev/null
+++ b/cli/tests/lsp/semantic_tokens_full_request.json
@@ -0,0 +1,10 @@
+{
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "textDocument/semanticTokens/full",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ }
+ }
+}
diff --git a/cli/tests/lsp/semantic_tokens_range_request.json b/cli/tests/lsp/semantic_tokens_range_request.json
new file mode 100644
index 000000000..3b09944a1
--- /dev/null
+++ b/cli/tests/lsp/semantic_tokens_range_request.json
@@ -0,0 +1,20 @@
+{
+ "jsonrpc": "2.0",
+ "id": 4,
+ "method": "textDocument/semanticTokens/range",
+ "params": {
+ "textDocument": {
+ "uri": "file:///a/file.ts"
+ },
+ "range": {
+ "start": {
+ "line": 0,
+ "character": 0
+ },
+ "end": {
+ "line": 6,
+ "character": 0
+ }
+ }
+ }
+}