Skip to content

Commit 035962b

Browse files
Added test for find all refs of function expressions.
1 parent 934a3bf commit 035962b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @Filename: file1.ts
4+
////var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) {
5+
//// [|foo|]([|foo|], [|foo|]);
6+
////}
7+
8+
// @Filename: file2.ts
9+
/////// <reference path="file1.ts" />
10+
////foo();
11+
12+
13+
let ranges = test.ranges()
14+
for (let range of ranges) {
15+
goTo.position(range.start);
16+
17+
verify.referencesCountIs(ranges.length);
18+
for (let expectedReference of ranges) {
19+
verify.referencesAtPositionContains(expectedReference);
20+
}
21+
}

0 commit comments

Comments
 (0)