Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoTestSnapshot ¶
DoTestSnapshot runs a snapshot test with the given options
Types ¶
type GenerateReport ¶
type GenerateReport struct {
MissingExpected []string
GenerationErrors []error
CompilationErrors []error
LintErrors []error
IgnoredCompile []error
IgnoredLint []error
}
func (GenerateReport) HasFailures ¶
func (r GenerateReport) HasFailures() bool
type Options ¶
type Options struct {
Spec string
GenYaml string
IncludeGlobs []string
// ExcludeGlobs lists path patterns that must NOT exist after generation.
// A trailing "/**" matches everything beneath a directory (e.g. "docs/**");
// otherwise filepath.Match semantics apply to the slash-relative path. Any
// match fails the test. Useful for asserting a feature suppressed output —
// e.g. `generation.documentation: none` skipping `docs/**`.
ExcludeGlobs []string
Expected string
GenOpts []generate.GeneratorOptions
AfterGenerate func(t *testing.T, tempDir string)
ExpectErrors []string
ShouldCompile *bool
}
Options holds the configuration for a snapshot test
Click to show internal directories.
Click to hide internal directories.