|
9 | 9 | //// |
10 | 10 | ////function f(this: { x: number }) { /*f*/ } |
11 | 11 |
|
12 | | -goTo.marker(""); |
13 | | - |
14 | | -verify.completionListContains("xyz", "(method) C.xyz(): any", "", "method", undefined, undefined, { |
15 | | - includeInsertTextCompletions: true, |
16 | | - insertText: "this.xyz", |
17 | | -}); |
18 | | - |
19 | | -verify.completionListContains("foo bar", '(property) C["foo bar"]: number', "", "property", undefined, undefined, { |
20 | | - includeInsertTextCompletions: true, |
21 | | - insertText: 'this["foo bar"]', |
22 | | -}); |
23 | | - |
24 | | -goTo.marker("f"); |
25 | | - |
26 | | -verify.completionListContains("x", "(property) x: number", "", "property", undefined, undefined, { |
27 | | - includeInsertTextCompletions: true, |
28 | | - insertText: "this.x", |
29 | | -}); |
| 12 | +const preferences: FourSlashInterface.UserPreferences = { includeInsertTextCompletions: true }; |
| 13 | +verify.completions( |
| 14 | + { |
| 15 | + marker: "", |
| 16 | + includes: [ |
| 17 | + { name: "xyz", text: "(method) C.xyz(): any", kind: "method", insertText: "this.xyz" }, |
| 18 | + { name: "foo bar", text: '(property) C["foo bar"]: number', kind: "property", insertText: 'this["foo bar"]' }, |
| 19 | + ], |
| 20 | + isNewIdentifierLocation: true, |
| 21 | + preferences, |
| 22 | + }, |
| 23 | + { |
| 24 | + marker: "f", |
| 25 | + includes: { name: "x", text: "(property) x: number", kind: "property", insertText: "this.x" }, |
| 26 | + preferences, |
| 27 | + }, |
| 28 | +); |
0 commit comments