Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Failed = func(s string) string { return FailedSigil + s }
Formatter for failed Match
var FailedSigil = "✘ "
Sigil for failed Match.
default: "✘ "
var FailedSuppressed = func(s string) string { sig := FailedSuppressedSigil return sig + s }
Formatter for failed Match in passed test
var FailedSuppressedSigil = "~ "
Sigil for failed but suppressed Match
default: "* "
var FilepathReplace = []replacer{}
When set, this filepath will be replaced with FilepathReplaceWith value. If this value is empty string, replacing is not performed.
Default is value of envvar ITS_REPLACE_FILEPATH. When you set a special value "!project" to ITS_REPLACE_FILEPATH, the replace path will be the project root detected by heuristics.
The project root is the most shallow filepath having ".git", "go.work" or "go.mod" from working directory.
var INDENT = " "
Indent of messages
var Pass = func(s string) string { return PassSigil + s }
Formatter for passed Match
var PassSigil = "✔ "
Sigil for passed Match
default; "✔ "
var StrictModeForStruct = false
If false (lax mode), by default, nil matchers in spec generated its-structer will fallback to its.Always().
If set true (strict mode), nil matchers fallback to its.Never()
Functions ¶
func ReplaceFilepath ¶ added in v0.4.0
func ReplaceProjectRoot ¶ added in v0.2.0
func ReplaceProjectRoot()
Work as start test with envvar ITS_REPLACE_FILEPATH=!project .
func StrictStructMatch ¶ added in v0.1.3
func StrictStructMatch(t interface{ Cleanup(func()) }, strict bool)
When setting strict mode, nil fields in struct spec, generated by structer, fallback to its.Never() during test t.
The configuration will be rolled back at the end of the test.
Types ¶
This section is empty.