Skip to content

Commit 578a1ce

Browse files
committed
feat: optimize test cases
1 parent 0630cfe commit 578a1ce

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

tests/cases/fourslash/completionPropertyShorthandForObjectLiteral5.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
//// export const exportedConstant = 0;
55

66
// @Filename: /b.ts
7+
//// const foo = 'foo'
78
//// const obj = { exp/**/
89

910
verify.completions({
1011
marker: "",
12+
exact: completion.globalsPlus(["foo"]),
1113
preferences: { includeCompletionsForModuleExports: true },
1214
});
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference path="fourslash.ts" />
22

3-
//// var x = this as/*1*/
3+
//// var x = 'something'
4+
//// var y = this as/*1*/
45

5-
verify.completions({marker: "1", exact: completion.globals })
6+
verify.completions({marker: "1", exact: completion.globalsPlus(["x"]) })
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// <reference path='fourslash.ts' />
22

33
//@Filename: file.tsx
4-
//// var x = </**/;
4+
//// var x = 'something'
5+
//// var y = </**/;
56

6-
verify.completions({ marker: "", exact: [completion.globalThisEntry, ...completion.globalsVars, completion.undefinedVarEntry] });
7+
verify.completions({ marker: "", exact: [completion.globalThisEntry, ...completion.globalsVars, "x", completion.undefinedVarEntry] });

0 commit comments

Comments
 (0)