Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectComponentsForTest ¶
InjectComponentsForTest copies the components module into the test app directory and adds require/replace directives so go mod tidy can resolve component imports. This is needed because the components sub-module isn't published to the Go module proxy yet.
func ValidateCompilation ¶
func ValidateCompilation(t *testing.T, appDir string, opts ...ValidationOptions)
ValidateCompilation runs sqlc generate (if applicable), go mod tidy, and go build ./... in the given app directory. This ensures that generated code actually compiles and catches syntax errors, type mismatches, and missing dependencies before they reach production.
Types ¶
type ValidationOptions ¶
type ValidationOptions struct {
SkipGoModTidy bool // Skip go mod tidy (useful when the caller already ran it)
}
ValidationOptions controls optional steps in ValidateCompilation.
Click to show internal directories.
Click to hide internal directories.