@@ -192,7 +192,7 @@ describe('tsserver plugin', () => {
192
192
offset : 12 ,
193
193
} ) ;
194
194
195
- expect ( completions ) . toEqual ( {
195
+ expect ( completions ) . toMatchObject ( {
196
196
isGlobalCompletion : false ,
197
197
isMemberCompletion : true ,
198
198
isNewIdentifierLocation : false ,
@@ -201,13 +201,11 @@ describe('tsserver plugin', () => {
201
201
name : 'bar' ,
202
202
kind : 'property' ,
203
203
kindModifiers : 'optional' ,
204
- sortText : '1' ,
205
204
} ,
206
205
{
207
206
name : 'foo' ,
208
207
kind : 'property' ,
209
208
kindModifiers : 'optional' ,
210
- sortText : '1' ,
211
209
} ,
212
210
] ,
213
211
} ) ;
@@ -244,11 +242,10 @@ describe('tsserver plugin', () => {
244
242
offset : 13 ,
245
243
} ) ;
246
244
247
- expect ( completions ?. entries ) . toContainEqual ( {
245
+ expect ( completions ?. entries . find ( ( entry ) => entry . name === 'message' ) ) . toMatchObject ( {
248
246
kind : 'property' ,
249
247
kindModifiers : 'private' ,
250
248
name : 'message' ,
251
- sortText : '0' ,
252
249
} ) ;
253
250
254
251
let details = await server . request ( CommandTypes . CompletionDetails , {
@@ -285,11 +282,10 @@ describe('tsserver plugin', () => {
285
282
offset : 9 ,
286
283
} ) ;
287
284
288
- expect ( completions ?. entries ) . toContainEqual ( {
285
+ expect ( completions ?. entries . find ( ( entry ) => entry . name === 'items' ) ) . toMatchObject ( {
289
286
kind : 'property' ,
290
287
kindModifiers : '' ,
291
288
name : 'items' ,
292
- sortText : '0' ,
293
289
} ) ;
294
290
295
291
let details = await server . request ( CommandTypes . CompletionDetails , {
@@ -324,11 +320,10 @@ describe('tsserver plugin', () => {
324
320
offset : 8 ,
325
321
} ) ;
326
322
327
- expect ( completions ?. entries ) . toContainEqual ( {
323
+ expect ( completions ?. entries . find ( ( entry ) => entry . name === 'letter' ) ) . toMatchObject ( {
328
324
kind : 'parameter' ,
329
325
kindModifiers : '' ,
330
326
name : 'letter' ,
331
- sortText : '0' ,
332
327
} ) ;
333
328
334
329
let details = await server . request ( CommandTypes . CompletionDetails , {
@@ -363,11 +358,10 @@ describe('tsserver plugin', () => {
363
358
offset : 8 ,
364
359
} ) ;
365
360
366
- expect ( completions ?. entries ) . toContainEqual ( {
361
+ expect ( completions ?. entries . find ( ( entry ) => entry . name === 'greeting' ) ) . toMatchObject ( {
367
362
kind : 'const' ,
368
363
kindModifiers : '' ,
369
364
name : 'greeting' ,
370
- sortText : '0' ,
371
365
} ) ;
372
366
373
367
let details = await server . request ( CommandTypes . CompletionDetails , {
@@ -406,11 +400,10 @@ describe('tsserver plugin', () => {
406
400
offset : 10 ,
407
401
} ) ;
408
402
409
- expect ( completions ?. entries ) . toContainEqual ( {
403
+ expect ( completions ?. entries . find ( ( entry ) => entry . name === 'Greeting' ) ) . toMatchObject ( {
410
404
name : 'Greeting' ,
411
405
kind : 'class' ,
412
406
kindModifiers : 'export' ,
413
- sortText : '5' ,
414
407
hasAction : true ,
415
408
source : project . filePath ( 'greeting' ) ,
416
409
} ) ;
@@ -470,11 +463,10 @@ describe('tsserver plugin', () => {
470
463
offset : 10 ,
471
464
} ) ;
472
465
473
- expect ( completions ?. entries ) . toContainEqual ( {
466
+ expect ( completions ?. entries . find ( ( entry ) => entry . name === 'Greeting' ) ) . toMatchObject ( {
474
467
name : 'Greeting' ,
475
468
kind : 'class' ,
476
469
kindModifiers : 'export' ,
477
- sortText : '5' ,
478
470
hasAction : true ,
479
471
source : project . filePath ( 'greeting' ) ,
480
472
} ) ;
0 commit comments