Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions internal/fourslash/_scripts/failingTests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,9 @@ TestDoubleUnderscoreCompletions
TestEditJsdocType
TestExportDefaultClass
TestExportDefaultFunction
TestFindAllReferencesDynamicImport1
TestFindAllReferencesUmdModuleAsGlobalConst
TestFindAllRefsExportEquals
TestFindAllRefsForDefaultExport03
TestFindAllRefsForModule
TestFindAllRefsModuleDotExports
TestFindAllRefs_importType_typeofImport
TestFindReferencesBindingPatternInJsdocNoCrash1
TestFindReferencesBindingPatternInJsdocNoCrash2
TestGenericCombinatorWithConstraints1
Expand Down Expand Up @@ -262,7 +258,6 @@ TestJsdocTypedefTag
TestJsdocTypedefTag2
TestJsdocTypedefTagNamespace
TestJsdocTypedefTagServices
TestJsxFindAllReferencesOnRuntimeImportWithPaths1
TestLetQuickInfoAndCompletionList
TestLocalFunction
TestMemberListInReopenedEnum
Expand Down Expand Up @@ -436,7 +431,6 @@ TestQuickinfoWrongComment
TestRecursiveInternalModuleImport
TestReferencesForStatementKeywords
TestReferencesInEmptyFile
TestReferencesIsAvailableThroughGlobalNoCrash
TestRegexDetection
TestRenameForAliasingExport02
TestRenameFromNodeModulesDep1
Expand All @@ -461,7 +455,6 @@ TestTripleSlashRefPathCompletionExtensionsAllowJSFalse
TestTripleSlashRefPathCompletionExtensionsAllowJSTrue
TestTripleSlashRefPathCompletionHiddenFile
TestTripleSlashRefPathCompletionRootdirs
TestTslibFindAllReferencesOnRuntimeImportWithPaths1
TestTsxCompletion14
TestTsxCompletion15
TestTsxCompletionNonTagLessThan
Expand Down
21 changes: 21 additions & 0 deletions internal/fourslash/tests/documentHighlightImportPath_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package fourslash_test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test repro the crash?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this still applies:

#1796 does fix it, though I have yet to make a test which actually shows the crash and not just an empty response.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort of. It returns a nil location which fails the test runner. I still could not get a good test...


import (
"testing"

"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)

func TestDocumentHighlightImportPath(t *testing.T) {
t.Parallel()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: /a.ts
export const x = 0;

// @Filename: /b.ts
import { x } from "[|./a|]";`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineDocumentHighlights(t, nil /*preferences*/, f.Ranges()[0])
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestFindAllReferencesDynamicImport1(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: foo.ts
export function foo() { return "foo"; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestFindAllReferencesUmdModuleAsGlobalConst(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: /node_modules/@types/three/three-core.d.ts
export class Vector3 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestFindAllRefsExportEquals(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: /a.ts
type /*0*/T = number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestFindAllRefs_importType_typeofImport(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: /a.ts
export const x = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestJsxFindAllReferencesOnRuntimeImportWithPaths1(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: project/src/foo.ts
import * as x from /**/"@foo/dir/jsx-runtime";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestReferencesIsAvailableThroughGlobalNoCrash(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: /packages/playwright-core/bundles/utils/node_modules/@types/debug/index.d.ts
declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestTslibFindAllReferencesOnRuntimeImportWithPaths1(t *testing.T) {
t.Parallel()
t.Skip()

defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: project/src/foo.ts
import * as x from /**/"tslib";
Expand Down
Loading