Files
kjol/tools/tsgo/internal/fourslash/tests/quickinfoVerbosityIncreaseDecrease_test.go
2026-07-09 16:50:43 -04:00

65 lines
1.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestQuickinfoVerbosityIncreaseDecrease(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `export const JOB_STATES = ["created", "active", "completed", "failed", "retry", "cancelled", "archive"] as const
export type JobState = (typeof JOB_STATES)[number]
type Color = "default" | "primary" | "secondary" | "success" | "warning" | "danger"
const JobsStateToColor/*a*/: Record<
JobState,
{
color: Color
label: string
labelPlural: string
}
> = {
created: {
color: "success",
label: "Направљен",
labelPlural: "Направљени",
},
active: {
color: "success",
label: "Активан",
labelPlural: "Активни",
},
completed: {
color: "success",
label: "Успешан",
labelPlural: "Успешни",
},
cancelled: {
color: "default",
label: "Отаказан",
labelPlural: "Отаказни",
},
failed: {
color: "danger",
label: "Пао",
labelPlural: "Пали",
},
archive: {
color: "default",
label: "Архивиран",
labelPlural: "Архивирани",
},
retry: {
color: "warning",
label: "Понавља се",
labelPlural: "Понављају се",
},
}`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineHoverWithVerbosity(t, map[string][]int{"a": {0, 1, 0}})
}