Skip to content

Commit 2a336d0

Browse files
jakebaileyCopilot
andauthored
Implement more of doc highlights / find all refs (#1796)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent 986c3dd commit 2a336d0

29 files changed

+783
-166
lines changed

internal/fourslash/_scripts/failingTests.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,9 @@ TestDoubleUnderscoreCompletions
168168
TestEditJsdocType
169169
TestExportDefaultClass
170170
TestExportDefaultFunction
171-
TestFindAllReferencesDynamicImport1
172-
TestFindAllReferencesUmdModuleAsGlobalConst
173-
TestFindAllRefsExportEquals
174171
TestFindAllRefsForDefaultExport03
175172
TestFindAllRefsForModule
176173
TestFindAllRefsModuleDotExports
177-
TestFindAllRefs_importType_typeofImport
178174
TestFindReferencesBindingPatternInJsdocNoCrash1
179175
TestFindReferencesBindingPatternInJsdocNoCrash2
180176
TestGenericCombinatorWithConstraints1
@@ -262,7 +258,6 @@ TestJsdocTypedefTag
262258
TestJsdocTypedefTag2
263259
TestJsdocTypedefTagNamespace
264260
TestJsdocTypedefTagServices
265-
TestJsxFindAllReferencesOnRuntimeImportWithPaths1
266261
TestLetQuickInfoAndCompletionList
267262
TestLocalFunction
268263
TestMemberListInReopenedEnum
@@ -436,7 +431,6 @@ TestQuickinfoWrongComment
436431
TestRecursiveInternalModuleImport
437432
TestReferencesForStatementKeywords
438433
TestReferencesInEmptyFile
439-
TestReferencesIsAvailableThroughGlobalNoCrash
440434
TestRegexDetection
441435
TestRenameForAliasingExport02
442436
TestRenameFromNodeModulesDep1
@@ -461,7 +455,6 @@ TestTripleSlashRefPathCompletionExtensionsAllowJSFalse
461455
TestTripleSlashRefPathCompletionExtensionsAllowJSTrue
462456
TestTripleSlashRefPathCompletionHiddenFile
463457
TestTripleSlashRefPathCompletionRootdirs
464-
TestTslibFindAllReferencesOnRuntimeImportWithPaths1
465458
TestTsxCompletion14
466459
TestTsxCompletion15
467460
TestTsxCompletionNonTagLessThan
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package fourslash_test
2+
3+
import (
4+
"testing"
5+
6+
"github.com/microsoft/typescript-go/internal/fourslash"
7+
"github.com/microsoft/typescript-go/internal/testutil"
8+
)
9+
10+
func TestDocumentHighlightImportPath(t *testing.T) {
11+
t.Parallel()
12+
13+
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
14+
const content = `// @Filename: /a.ts
15+
export const x = 0;
16+
17+
// @Filename: /b.ts
18+
import { x } from "[|./a|]";`
19+
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
20+
f.VerifyBaselineDocumentHighlights(t, nil /*preferences*/, f.Ranges()[0])
21+
}

internal/fourslash/tests/gen/findAllReferencesDynamicImport1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestFindAllReferencesDynamicImport1(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: foo.ts
1515
export function foo() { return "foo"; }

internal/fourslash/tests/gen/findAllReferencesUmdModuleAsGlobalConst_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestFindAllReferencesUmdModuleAsGlobalConst(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: /node_modules/@types/three/three-core.d.ts
1515
export class Vector3 {

internal/fourslash/tests/gen/findAllRefsExportEquals_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestFindAllRefsExportEquals(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: /a.ts
1515
type /*0*/T = number;

internal/fourslash/tests/gen/findAllRefs_importType_typeofImport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestFindAllRefs_importType_typeofImport(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: /a.ts
1515
export const x = 0;

internal/fourslash/tests/gen/jsxFindAllReferencesOnRuntimeImportWithPaths1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestJsxFindAllReferencesOnRuntimeImportWithPaths1(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: project/src/foo.ts
1515
import * as x from /**/"@foo/dir/jsx-runtime";

internal/fourslash/tests/gen/referencesIsAvailableThroughGlobalNoCrash_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestReferencesIsAvailableThroughGlobalNoCrash(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: /packages/playwright-core/bundles/utils/node_modules/@types/debug/index.d.ts
1515
declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };

internal/fourslash/tests/gen/tslibFindAllReferencesOnRuntimeImportWithPaths1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestTslibFindAllReferencesOnRuntimeImportWithPaths1(t *testing.T) {
1111
t.Parallel()
12-
t.Skip()
12+
1313
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1414
const content = `// @Filename: project/src/foo.ts
1515
import * as x from /**/"tslib";

0 commit comments

Comments
 (0)