Skip to content

Commit ca1e787

Browse files
author
Andy Hanson
committed
Improve tests
1 parent 81a43f0 commit ca1e787

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

tests/cases/fourslash/declarationExpressions.ts

+16-10
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@
77
////function D() {}
88
////const E = function F() {}
99
////console.log(function inner() {})
10+
////String(function fun() { class cls { public prop; } }))
1011

12+
function navExact(name: string, kind: string) {
13+
verify.navigationItemsListContains(name, kind, name, "exact");
14+
}
1115

12-
// Search for properties defined in the constructor, but not other constructor paramters
13-
var searchValue = "search";
14-
verify.navigationItemsListContains("A", "class", "A", "exact");
15-
verify.navigationItemsListContains("B", "const", "B", "exact");
16-
verify.navigationItemsListContains("C", "class", "C", "exact");
17-
verify.navigationItemsListContains("x", "property", "x", "exact");
16+
navExact("A", "class");
17+
navExact("B", "const");
18+
navExact("C", "class");
19+
navExact("x", "property");
1820

19-
verify.navigationItemsListContains("D", "function", "D", "exact");
20-
verify.navigationItemsListContains("E", "const", "E", "exact");
21-
verify.navigationItemsListContains("F", "function", "F", "exact")
21+
navExact("D", "function");
22+
navExact("E", "const");
23+
navExact("F", "function")
2224

23-
verify.navigationItemsListContains("inner", "function", "inner", "exact");
25+
navExact("inner", "function");
26+
27+
navExact("fun", "function");
28+
navExact("cls", "class");
29+
navExact("prop", "property");

0 commit comments

Comments
 (0)