summaryrefslogtreecommitdiff
path: root/test/lsp
diff options
context:
space:
mode:
authorMichael Jungo <michaeljungo92@gmail.com>2017-11-11 19:28:24 +0100
committerMichael Jungo <michaeljungo92@gmail.com>2017-11-11 19:28:24 +0100
commitfb00acf73441bffa9014f5a64a3f054069683052 (patch)
treea71e61d0e1633e4c65e94c2c0519b09528dcad60 /test/lsp
parentf8fec369e5daa1be9c3b8e580655920422542f75 (diff)
downloadale-fb00acf73441bffa9014f5a64a3f054069683052.zip
Remove id from LSP notifications
Diffstat (limited to 'test/lsp')
-rw-r--r--test/lsp/test_lsp_connections.vader28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/lsp/test_lsp_connections.vader b/test/lsp/test_lsp_connections.vader
index 5549b1f7..8651d801 100644
--- a/test/lsp/test_lsp_connections.vader
+++ b/test/lsp/test_lsp_connections.vader
@@ -26,7 +26,7 @@ Execute(ale#lsp#CreateMessageData() should create an appropriate message):
\ [
\ 1,
\ "Content-Length: 79\r\n\r\n"
- \ . '{"id": 1, "jsonrpc": "2.0", "method": "someMethod", "params": {"foo": "barÜ"}}',
+ \ . '{"method": "someMethod", "jsonrpc": "2.0", "id": 1, "params": {"foo": "barÜ"}}',
\ ],
\ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}])
" Check again to ensure that we use the next ID.
@@ -34,7 +34,7 @@ Execute(ale#lsp#CreateMessageData() should create an appropriate message):
\ [
\ 2,
\ "Content-Length: 79\r\n\r\n"
- \ . '{"id": 2, "jsonrpc": "2.0", "method": "someMethod", "params": {"foo": "barÜ"}}',
+ \ . '{"method": "someMethod", "jsonrpc": "2.0", "id": 2, "params": {"foo": "barÜ"}}',
\ ],
\ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}])
else
@@ -42,14 +42,14 @@ Execute(ale#lsp#CreateMessageData() should create an appropriate message):
\ [
\ 1,
\ "Content-Length: 71\r\n\r\n"
- \ . '{"id":1,"jsonrpc":"2.0","method":"someMethod","params":{"foo":"barÜ"}}',
+ \ . '{"method":"someMethod","jsonrpc":"2.0","id":1,"params":{"foo":"barÜ"}}',
\ ],
\ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}])
AssertEqual
\ [
\ 2,
\ "Content-Length: 71\r\n\r\n"
- \ . '{"id":2,"jsonrpc":"2.0","method":"someMethod","params":{"foo":"barÜ"}}',
+ \ . '{"method":"someMethod","jsonrpc":"2.0","id":2,"params":{"foo":"barÜ"}}',
\ ],
\ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}])
endif
@@ -60,7 +60,7 @@ Execute(ale#lsp#CreateMessageData() should create messages without params):
\ [
\ 1,
\ "Content-Length: 56\r\n\r\n"
- \ . '{"id": 1, "jsonrpc": "2.0", "method": "someOtherMethod"}',
+ \ . '{"method": "someOtherMethod", "jsonrpc": "2.0", "id": 1}',
\ ],
\ ale#lsp#CreateMessageData([0, 'someOtherMethod'])
else
@@ -68,7 +68,7 @@ Execute(ale#lsp#CreateMessageData() should create messages without params):
\ [
\ 1,
\ "Content-Length: 51\r\n\r\n"
- \ . '{"id":1,"jsonrpc":"2.0","method":"someOtherMethod"}',
+ \ . '{"method":"someOtherMethod","jsonrpc":"2.0","id":1}',
\ ],
\ ale#lsp#CreateMessageData([0, 'someOtherMethod'])
endif
@@ -78,30 +78,30 @@ Execute(ale#lsp#CreateMessageData() should create notifications):
AssertEqual
\ [
\ 0,
- \ "Content-Length: 60\r\n\r\n"
- \ . '{"id": null, "jsonrpc": "2.0", "method": "someNotification"}',
+ \ "Content-Length: 48\r\n\r\n"
+ \ . '{"method": "someNotification", "jsonrpc": "2.0"}',
\ ],
\ ale#lsp#CreateMessageData([1, 'someNotification'])
AssertEqual
\ [
\ 0,
- \ "Content-Length: 86\r\n\r\n"
- \ . '{"id": null, "jsonrpc": "2.0", "method": "someNotification", "params": {"foo": "bar"}}',
+ \ "Content-Length: 74\r\n\r\n"
+ \ . '{"method": "someNotification", "jsonrpc": "2.0", "params": {"foo": "bar"}}',
\ ],
\ ale#lsp#CreateMessageData([1, 'someNotification', {'foo': 'bar'}])
else
AssertEqual
\ [
\ 0,
- \ "Content-Length: 55\r\n\r\n"
- \ . '{"id":null,"jsonrpc":"2.0","method":"someNotification"}',
+ \ "Content-Length: 45\r\n\r\n"
+ \ . '{"method":"someNotification","jsonrpc":"2.0"}',
\ ],
\ ale#lsp#CreateMessageData([1, 'someNotification'])
AssertEqual
\ [
\ 0,
- \ "Content-Length: 78\r\n\r\n"
- \ . '{"id":null,"jsonrpc":"2.0","method":"someNotification","params":{"foo":"bar"}}',
+ \ "Content-Length: 68\r\n\r\n"
+ \ . '{"method":"someNotification","jsonrpc":"2.0","params":{"foo":"bar"}}',
\ ],
\ ale#lsp#CreateMessageData([1, 'someNotification', {'foo': 'bar'}])
endif