@@ -37,22 +37,22 @@ describe("LanguageClientConnection", () => {
3737 await lc . initialize ( params )
3838
3939 expect ( lc . _sendRequest . called ) . equals ( true )
40- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "initialize" )
40+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "initialize" )
4141 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
4242 } )
4343
4444 it ( "sends a request for shutdown" , async ( ) => {
4545 await lc . shutdown ( )
4646
4747 expect ( lc . _sendRequest . called ) . equals ( true )
48- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "shutdown" )
48+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "shutdown" )
4949 } )
5050
5151 it ( "sends a request for completion" , async ( ) => {
5252 await lc . completion ( textDocumentPositionParams )
5353
5454 expect ( lc . _sendRequest . called ) . equals ( true )
55- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/completion" )
55+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/completion" )
5656 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
5757 } )
5858
@@ -61,55 +61,55 @@ describe("LanguageClientConnection", () => {
6161 await lc . completionItemResolve ( completionItem )
6262
6363 expect ( lc . _sendRequest . called ) . equals ( true )
64- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "completionItem/resolve" )
64+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "completionItem/resolve" )
6565 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( completionItem )
6666 } )
6767
6868 it ( "sends a request for hover" , async ( ) => {
6969 await lc . hover ( textDocumentPositionParams )
7070
7171 expect ( lc . _sendRequest . called ) . equals ( true )
72- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/hover" )
72+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/hover" )
7373 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
7474 } )
7575
7676 it ( "sends a request for signatureHelp" , async ( ) => {
7777 await lc . signatureHelp ( textDocumentPositionParams )
7878
7979 expect ( lc . _sendRequest . called ) . equals ( true )
80- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/signatureHelp" )
80+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/signatureHelp" )
8181 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
8282 } )
8383
8484 it ( "sends a request for gotoDefinition" , async ( ) => {
8585 await lc . gotoDefinition ( textDocumentPositionParams )
8686
8787 expect ( lc . _sendRequest . called ) . equals ( true )
88- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/definition" )
88+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/definition" )
8989 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
9090 } )
9191
9292 it ( "sends a request for findReferences" , async ( ) => {
9393 await lc . findReferences ( textDocumentPositionParams )
9494
9595 expect ( lc . _sendRequest . called ) . equals ( true )
96- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/references" )
96+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/references" )
9797 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
9898 } )
9999
100100 it ( "sends a request for documentHighlight" , async ( ) => {
101101 await lc . documentHighlight ( textDocumentPositionParams )
102102
103103 expect ( lc . _sendRequest . called ) . equals ( true )
104- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/documentHighlight" )
104+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/documentHighlight" )
105105 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
106106 } )
107107
108108 it ( "sends a request for documentSymbol" , async ( ) => {
109109 await lc . documentSymbol ( textDocumentPositionParams )
110110
111111 expect ( lc . _sendRequest . called ) . equals ( true )
112- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/documentSymbol" )
112+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/documentSymbol" )
113113 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( textDocumentPositionParams )
114114 } )
115115
@@ -118,7 +118,7 @@ describe("LanguageClientConnection", () => {
118118 await lc . workspaceSymbol ( params )
119119
120120 expect ( lc . _sendRequest . called ) . equals ( true )
121- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "workspace/symbol" )
121+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "workspace/symbol" )
122122 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
123123 } )
124124
@@ -134,7 +134,7 @@ describe("LanguageClientConnection", () => {
134134 await lc . codeAction ( params )
135135
136136 expect ( lc . _sendRequest . called ) . equals ( true )
137- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/codeAction" )
137+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/codeAction" )
138138 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
139139 } )
140140
@@ -145,7 +145,7 @@ describe("LanguageClientConnection", () => {
145145 await lc . codeLens ( params )
146146
147147 expect ( lc . _sendRequest . called ) . equals ( true )
148- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/codeLens" )
148+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/codeLens" )
149149 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
150150 } )
151151
@@ -159,7 +159,7 @@ describe("LanguageClientConnection", () => {
159159 await lc . codeLensResolve ( params )
160160
161161 expect ( lc . _sendRequest . called ) . equals ( true )
162- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "codeLens/resolve" )
162+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "codeLens/resolve" )
163163 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
164164 } )
165165
@@ -170,7 +170,7 @@ describe("LanguageClientConnection", () => {
170170 await lc . documentLink ( params )
171171
172172 expect ( lc . _sendRequest . called ) . equals ( true )
173- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/documentLink" )
173+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/documentLink" )
174174 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
175175 } )
176176
@@ -185,7 +185,7 @@ describe("LanguageClientConnection", () => {
185185 await lc . documentLinkResolve ( params )
186186
187187 expect ( lc . _sendRequest . called ) . equals ( true )
188- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "documentLink/resolve" )
188+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "documentLink/resolve" )
189189 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
190190 } )
191191
@@ -197,7 +197,7 @@ describe("LanguageClientConnection", () => {
197197 await lc . documentFormatting ( params )
198198
199199 expect ( lc . _sendRequest . called ) . equals ( true )
200- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/formatting" )
200+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/formatting" )
201201 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
202202 } )
203203
@@ -213,7 +213,7 @@ describe("LanguageClientConnection", () => {
213213 await lc . documentRangeFormatting ( params )
214214
215215 expect ( lc . _sendRequest . called ) . equals ( true )
216- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/rangeFormatting" )
216+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/rangeFormatting" )
217217 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
218218 } )
219219
@@ -227,7 +227,7 @@ describe("LanguageClientConnection", () => {
227227 await lc . documentOnTypeFormatting ( params )
228228
229229 expect ( lc . _sendRequest . called ) . equals ( true )
230- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/onTypeFormatting" )
230+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/onTypeFormatting" )
231231 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
232232 } )
233233
@@ -240,7 +240,7 @@ describe("LanguageClientConnection", () => {
240240 await lc . rename ( params )
241241
242242 expect ( lc . _sendRequest . called ) . equals ( true )
243- expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/rename" )
243+ expect ( lc . _sendRequest . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/rename" )
244244 expect ( lc . _sendRequest . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
245245 } )
246246 } )
@@ -268,15 +268,15 @@ describe("LanguageClientConnection", () => {
268268 lc . exit ( )
269269
270270 expect ( lc . _sendNotification . called ) . equals ( true )
271- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "exit" )
271+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "exit" )
272272 expect ( lc . _sendNotification . getCall ( 0 ) . args . length ) . equals ( 1 )
273273 } )
274274
275275 it ( "initialized sends notification" , ( ) => {
276276 lc . initialized ( )
277277
278278 expect ( lc . _sendNotification . called ) . equals ( true )
279- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "initialized" )
279+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "initialized" )
280280 const expected : ls . InitializedParams = { }
281281 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . to . deep . equal ( expected )
282282 } )
@@ -288,7 +288,7 @@ describe("LanguageClientConnection", () => {
288288 lc . didChangeConfiguration ( params )
289289
290290 expect ( lc . _sendNotification . called ) . equals ( true )
291- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "workspace/didChangeConfiguration" )
291+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "workspace/didChangeConfiguration" )
292292 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
293293 } )
294294
@@ -299,7 +299,7 @@ describe("LanguageClientConnection", () => {
299299 lc . didOpenTextDocument ( params )
300300
301301 expect ( lc . _sendNotification . called ) . equals ( true )
302- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/didOpen" )
302+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/didOpen" )
303303 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
304304 } )
305305
@@ -311,7 +311,7 @@ describe("LanguageClientConnection", () => {
311311 lc . didChangeTextDocument ( params )
312312
313313 expect ( lc . _sendNotification . called ) . equals ( true )
314- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/didChange" )
314+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/didChange" )
315315 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
316316 } )
317317
@@ -322,7 +322,7 @@ describe("LanguageClientConnection", () => {
322322 lc . didCloseTextDocument ( params )
323323
324324 expect ( lc . _sendNotification . called ) . equals ( true )
325- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/didClose" )
325+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/didClose" )
326326 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
327327 } )
328328
@@ -333,7 +333,7 @@ describe("LanguageClientConnection", () => {
333333 lc . didSaveTextDocument ( params )
334334
335335 expect ( lc . _sendNotification . called ) . equals ( true )
336- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "textDocument/didSave" )
336+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "textDocument/didSave" )
337337 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
338338 } )
339339
@@ -342,7 +342,7 @@ describe("LanguageClientConnection", () => {
342342 lc . didChangeWatchedFiles ( params )
343343
344344 expect ( lc . _sendNotification . called ) . equals ( true )
345- expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] ) . equals ( "workspace/didChangeWatchedFiles" )
345+ expect ( lc . _sendNotification . getCall ( 0 ) . args [ 0 ] . method ) . equals ( "workspace/didChangeWatchedFiles" )
346346 expect ( lc . _sendNotification . getCall ( 0 ) . args [ 1 ] ) . equals ( params )
347347 } )
348348 } )
0 commit comments