Skip to content

Commit c4d73a0

Browse files
committed
add basic tests!
1 parent d62bcc5 commit c4d73a0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/cases/fourslash/completionListWithoutVariableinitializer.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
//// const fn = (p = /*7*/) => {}
1010
//// const { g, h = /*8*/ } = { ... }
1111
//// const [ g1, h1 = /*9*/ ] = [ ... ]
12+
//// const { a1 } = a/*10*/;
13+
//// const { a2 } = fn({a: a/*11*/});
14+
//// const [ a3 ] = a/*12*/;
15+
//// const [ a4 ] = fn([a/*13*/]);
1216

1317
verify.completions({
1418
marker: ["1"],
@@ -58,3 +62,26 @@ verify.completions({
5862
marker: ["9"],
5963
includes: ["a", "b", "c", "d", "e", "fn"],
6064
});
65+
66+
verify.completions({
67+
marker: ["10"],
68+
excludes: ["a1"],
69+
isNewIdentifierLocation: true,
70+
});
71+
72+
verify.completions({
73+
marker: ["11"],
74+
excludes: ["a2"],
75+
});
76+
77+
verify.completions({
78+
marker: ["12"],
79+
excludes: ["a3"],
80+
isNewIdentifierLocation: true,
81+
});
82+
83+
verify.completions({
84+
marker: ["13"],
85+
excludes: ["a4"],
86+
isNewIdentifierLocation: true,
87+
});

0 commit comments

Comments
 (0)