Documentation ¶
Overview ¶
Package build supports building and testing Encore applications with codegen and rewrite overlays.
Package build supports building and testing Encore applications with codegen and rewrite overlays.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTestFailed = errRange.New("Test Failure", "One or more more tests failed.")
)
Functions ¶
func RunTests ¶ added in v1.34.0
func RunTests(ctx context.Context, spec *TestSpec, cfg *RunTestsConfig)
func Test ¶
func Test(ctx context.Context, cfg *TestConfig)
Types ¶
type Config ¶
type Config struct { // Ctx controls the build. Ctx *parsectx.Context // Overlays describes the code generation overlays to apply, // in the form of rewritten files or generated files. Overlays []overlay.File // KeepOutput keeps the temporary build directory from being deleted in the case of failure. KeepOutput bool // Env are additional environment variables to set. Env []string // MainPkg is the main package to build. MainPkg paths.Pkg // NoBinary specifies that no binary should be built. // It's used if MainPkg specifies multiple packages, // which for example is the case when checking for compilation errors // without building a binary (such as during tests). NoBinary bool // StaticConfig is the static config to embed into the binary. StaticConfig *config.Static }
type GenerateTestSpecConfig ¶ added in v1.34.0
type RunTestsConfig ¶ added in v1.34.0
type TestConfig ¶
type TestConfig struct { GenerateTestSpecConfig RunTestsConfig }
Click to show internal directories.
Click to hide internal directories.