Documentation
¶
Index ¶
- func FixtureRoot() string
- func LoadBasicTokens(t *testing.T, server *lsp.Server)
- func LoadCSSFixture(t *testing.T, name string) string
- func LoadGoldenFile(t *testing.T, name string) string
- func LoadNonTokenFixture(t *testing.T, name string) []byte
- func LoadTokenFixture(t *testing.T, name string) []byte
- func LoadTokensWithPrefix(t *testing.T, server *lsp.Server, prefix string)
- func NewTestServer(t *testing.T) *lsp.Server
- func OpenCSSFixture(t *testing.T, server *lsp.Server, uri, fixtureName string)
- func OpenNonTokenFixture(t *testing.T, server *lsp.Server, uri, fixtureName string)
- func OpenTokenFixture(t *testing.T, server *lsp.Server, uri, fixtureName string)
- func SetCodeActionLiteralSupport(server *lsp.Server)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixtureRoot ¶
func FixtureRoot() string
FixtureRoot returns the path to the test fixtures directory
func LoadBasicTokens ¶
LoadBasicTokens loads the basic-colors.json fixture into the server
func LoadCSSFixture ¶
LoadCSSFixture loads a CSS fixture file and returns the content
func LoadGoldenFile ¶
LoadGoldenFile loads a golden file for comparison
func LoadNonTokenFixture ¶ added in v0.1.18
LoadNonTokenFixture loads a non-token file fixture and returns the bytes
func LoadTokenFixture ¶
LoadTokenFixture loads a token fixture file and returns the bytes
func LoadTokensWithPrefix ¶
LoadTokensWithPrefix loads the with-prefix.json fixture into the server
func NewTestServer ¶
NewTestServer creates a new LSP server for testing
func OpenCSSFixture ¶
OpenCSSFixture opens a CSS fixture file in the server
func OpenNonTokenFixture ¶ added in v0.1.18
OpenNonTokenFixture opens a non-token JSON/YAML fixture file as a document in the server This is for testing that LSP features are NOT provided for non-token files
func OpenTokenFixture ¶
OpenTokenFixture opens a token fixture file as a document in the server This is useful for testing references/definition from token files
func SetCodeActionLiteralSupport ¶ added in v0.1.18
SetCodeActionLiteralSupport sets the client capabilities to support CodeAction literals. Call this before tests that use code actions.
Types ¶
This section is empty.