35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual completionsDotInArrayLiteralInObjectLiteral"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestCompletionsDotInArrayLiteralInObjectLiteral(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `const o = { x: [[|.|][||]/**/`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyNonSuggestionDiagnostics(t, []*lsproto.Diagnostic{
|
|
{
|
|
Code: &lsproto.IntegerOrString{Integer: new(int32(1109))},
|
|
Message: lsproto.StringOrMarkupContent{String: new("Expression expected.")},
|
|
Range: f.Ranges()[0].LSRange,
|
|
},
|
|
{
|
|
Code: &lsproto.IntegerOrString{Integer: new(int32(1003))},
|
|
Message: lsproto.StringOrMarkupContent{String: new("Identifier expected.")},
|
|
Range: f.Ranges()[1].LSRange,
|
|
},
|
|
})
|
|
f.VerifyCompletions(t, "", nil)
|
|
}
|