Skip to content

Commit a522672

Browse files
committed
Fix tests
1 parent 3794e04 commit a522672

10 files changed

+13
-3
lines changed

src/harness/client.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ namespace ts.server {
200200
const response = this.processResponse<protocol.CompletionInfoResponse>(request);
201201

202202
return {
203-
isGlobalCompletion: false,
204-
isMemberCompletion: false,
205-
isNewIdentifierLocation: false,
203+
isGlobalCompletion: response.body!.isGlobalCompletion,
204+
isMemberCompletion: response.body!.isMemberCompletion,
205+
isNewIdentifierLocation: response.body!.isNewIdentifierLocation,
206206
entries: response.body!.entries.map<CompletionEntry>(entry => { // TODO: GH#18217
207207
if (entry.replacementSpan !== undefined) {
208208
const res: CompletionEntry = { ...entry, data: entry.data as any, replacementSpan: this.decodeSpan(entry.replacementSpan, fileName) };

tests/cases/fourslash/importStatementCompletions1.ts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
[0, 1, 2, 3, 4, 5].forEach(marker => {
2525
verify.completions({
26+
isNewIdentifierLocation: true,
2627
marker: "" + marker,
2728
exact: [{
2829
name: "foo",
@@ -65,6 +66,7 @@
6566

6667
[6, 7, 8, 9, 10, 11, 12].forEach(marker => {
6768
verify.completions({
69+
isNewIdentifierLocation: true,
6870
marker: "" + marker,
6971
exact: [],
7072
preferences: {

tests/cases/fourslash/importStatementCompletions_esModuleInterop1.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//// [|import f/**/|]
1111

1212
verify.completions({
13+
isNewIdentifierLocation: true,
1314
marker: "",
1415
exact: [{
1516
name: "foo",

tests/cases/fourslash/importStatementCompletions_esModuleInterop2.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//// [|import f/**/|]
1111

1212
verify.completions({
13+
isNewIdentifierLocation: true,
1314
marker: "",
1415
exact: [{
1516
name: "foo",

tests/cases/fourslash/importStatementCompletions_noPatternAmbient.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//// import style/**/
1111

1212
verify.completions({
13+
isNewIdentifierLocation: true,
1314
marker: "",
1415
exact: [],
1516
preferences: {

tests/cases/fourslash/importStatementCompletions_noSnippet.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//// [|import f/**/|]
88

99
verify.completions({
10+
isNewIdentifierLocation: true,
1011
marker: "",
1112
exact: [{
1213
name: "foo",

tests/cases/fourslash/importStatementCompletions_quotes.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//// [|import f/**/|]
99

1010
verify.completions({
11+
isNewIdentifierLocation: true,
1112
marker: "",
1213
exact: [{
1314
name: "foo",

tests/cases/fourslash/importStatementCompletions_semicolons.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//// [|import f/**/|]
99

1010
verify.completions({
11+
isNewIdentifierLocation: true,
1112
marker: "",
1213
exact: [{
1314
name: "foo",

tests/cases/fourslash/server/importStatementCompletions_pnpm1.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
goTo.marker("");
1515
verify.completions({
16+
isNewIdentifierLocation: true,
1617
marker: "",
1718
exact: [{
1819
name: "Component",

tests/cases/fourslash/server/importStatementCompletions_pnpm2.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
goTo.marker("");
2020
verify.completions({
21+
isNewIdentifierLocation: true,
2122
marker: "",
2223
exact: [],
2324
preferences: {

0 commit comments

Comments
 (0)