units

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 11 Imported by: 37

README

units

为 starter 提供单元测试支持

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModuleT

func ModuleT() *application.ModuleBuilder

ModuleT 创建模块 github.com/starter-go/units

Types

type Registration

type Registration struct {
	Name     string
	Enabled  bool
	Priority int
	Test     func() error
}

Registration 测试单元注册信息

type Runner

type Runner interface {
	Dependencies(deps ...application.Module) Runner

	ModuleT(mb *application.ModuleBuilder) Runner

	Testing(t *testing.T) Runner

	EnablePanic(enabled bool) Runner

	Run(args []string) error
}

Runner 单元测试执行器

func NewRunner

func NewRunner() Runner

NewRunner 新建一个 Runner

type Units

type Units interface {
	ListUnits(list []*Registration) []*Registration
}

Units 测试单元注册接口

Directories

Path Synopsis
gen
modules
src
configen command
main/golang command
test/golang command

Jump to

Keyboard shortcuts

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