Documentation ¶
Overview ¶
*
- Pesticide are a package to help you to test your functions on a template
- engine. It provides a set of test cases that you can use to test your
- functions.
- More pesticide for less bugs.
Index ¶
- func ForceTimeLocal(t *testing.T, local *time.Location)
- func RunGroupTest(t *testing.T, rg *sprout.RegistryGroup, tc GroupTestCase)
- func RunRegexpTestCases(t *testing.T, registry sprout.Registry, tcs []RegexpTestCase)
- func RunTestCases(t *testing.T, registry sprout.Registry, tc []TestCase)
- func TestTemplate(t *testing.T, registry sprout.Registry, tmplString string, data any) (string, error)
- type GroupTestCase
- type RegexpTestCase
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForceTimeLocal ¶ added in v1.0.0
ForceTimeLocal temporarily sets time.Local for test purpose.
func RunGroupTest ¶ added in v1.0.0
func RunGroupTest(t *testing.T, rg *sprout.RegistryGroup, tc GroupTestCase)
func RunRegexpTestCases ¶
func RunRegexpTestCases(t *testing.T, registry sprout.Registry, tcs []RegexpTestCase)
Types ¶
type GroupTestCase ¶ added in v1.0.0
type GroupTestCase struct {
RegistriesUIDs []string
}
type RegexpTestCase ¶
Click to show internal directories.
Click to hide internal directories.