Skip to content

Commit 56ace39

Browse files
committed
test: Write test for string property crash
1 parent ddf0b72 commit 56ace39

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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/fourslash/tests/util"
8+
"github.com/microsoft/typescript-go/internal/testutil"
9+
)
10+
11+
func TestCompletionsJsdocStringProperty(t *testing.T) {
12+
t.Parallel()
13+
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
14+
15+
const content = `/**
16+
* @type {{
17+
* 'string-property': boolean;
18+
*/*$*/ identifierProperty: boolean;
19+
* }}
20+
*/
21+
var someVariable;`
22+
23+
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
24+
defer done()
25+
f.GoToMarker(t, "$")
26+
f.VerifyCompletions(t, nil, &fourslash.CompletionsExpectedList{
27+
IsIncomplete: false,
28+
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
29+
CommitCharacters: &[]string{},
30+
EditRange: Ignored,
31+
},
32+
Items: &fourslash.CompletionsExpectedItems{},
33+
})
34+
}

0 commit comments

Comments
 (0)