rule_tester

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunRuleTester

func RunRuleTester(rootDir string, tsconfigPath string, t *testing.T, r *rule.Rule, validTestCases []ValidTestCase, invalidTestCases []InvalidTestCase)

Types

type InvalidTestCase

type InvalidTestCase struct {
	Code     string
	FileName string
	Only     bool
	Skip     bool
	Output   []string
	Errors   []InvalidTestCaseError
	TSConfig string
	Options  any
	Tsx      bool
}

type InvalidTestCaseError

type InvalidTestCaseError struct {
	MessageId   string
	Line        int
	Column      int
	EndLine     int
	EndColumn   int
	Suggestions []InvalidTestCaseSuggestion
}

type InvalidTestCaseSuggestion

type InvalidTestCaseSuggestion struct {
	MessageId string
	Output    string
}

type ValidTestCase

type ValidTestCase struct {
	Code     string
	FileName string
	Only     bool
	Skip     bool
	Options  any
	TSConfig string
	Tsx      bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL