Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupTestSuites ¶
func CleanupTestSuites(suites ...*TestSuite)
CleanupTestSuites is a helper to clean up all test suites in a test
func FindRepoRoot ¶
FindRepoRoot locates the repository root by looking for specific indicators Exported so it can be used by other packages
func SnapshotTest ¶
SnapshotTest compares the actual result against an expected result file If the file doesn't exist or UPDATE_SNAPSHOTS=true env var is set, it will update the snapshot
Types ¶
type LSPTestConfig ¶
type LSPTestConfig struct {
Name string // Name of the language server
Command string // Command to run
Args []string // Arguments
WorkspaceDir string // Template workspace directory
InitializeTimeMs int // Time to wait after initialization in ms
}
LSPTestConfig defines configuration for a language server test
type TestSuite ¶
type TestSuite struct {
Config LSPTestConfig
Client *lsp.Client
WorkspaceDir string
TempDir string
Context context.Context
Cancel context.CancelFunc
Watcher *watcher.WorkspaceWatcher
LanguageName string
// contains filtered or unexported fields
}
TestSuite contains everything needed for running integration tests
func NewTestSuite ¶
func NewTestSuite(t *testing.T, config LSPTestConfig) *TestSuite
NewTestSuite creates a new test suite for the given language server
func (*TestSuite) Cleanup ¶
func (ts *TestSuite) Cleanup()
Cleanup stops the LSP and cleans up resources
Click to show internal directories.
Click to hide internal directories.