Documentation ¶
Index ¶
- Variables
- func ContainAnyMessageWithLevels(level log.Level, otherLevels ...log.Level) types.GomegaMatcher
- func ContainJSONLog(level log.Level, msg string) types.GomegaMatcher
- func ContainJSONLogWithOffset(level log.Level, startOffset int, endOffset int, msg string) types.GomegaMatcher
- func MatchDocument(expected *types.Document) gomegatypes.GomegaMatcher
- func MatchDocumentFragment(expected types.DocumentFragment) gomegatypes.GomegaMatcher
- func MatchDocumentFragments(expected []types.DocumentFragment) gomegatypes.GomegaMatcher
- func MatchHTML(expected string) gomegatypes.GomegaMatcher
- func MatchHTMLFromFile(filename string) gomegatypes.GomegaMatcher
- func MatchHTMLTemplate(expectedTmpl string, data interface{}) gomegatypes.GomegaMatcher
- func MatchHTMLTemplateFile(filename string, data interface{}) gomegatypes.GomegaMatcher
- func MatchInlineElements(expected []interface{}) gomegatypes.GomegaMatcher
- func MatchMetadata(expected types.Metadata) gomegatypes.GomegaMatcher
- func MatchTableOfContents(expected *types.TableOfContents) gomegatypes.GomegaMatcher
- func ParseDocument(actual string, options ...interface{}) (*types.Document, error)
- func ParseDocumentFragments(actual string, options ...parser.Option) ([]types.DocumentFragment, error)
- func PreparseDocument(source string, options ...interface{}) (string, error)
- func RenderHTML(actual string, settings ...configuration.Setting) (string, error)
- func RenderHTMLFromFile(filename string, settings ...configuration.Setting) (string, types.Metadata, error)
- func RenderHTMLWithMetadata(actual string, settings ...configuration.Setting) (string, types.Metadata, error)
- type Console
- type ConsoleOutput
- type TeeOption
Constants ¶
This section is empty.
Variables ¶
var IncludeStdOut = func(t *ConsoleOutput) { t.out = os.Stdout }
Functions ¶
func ContainAnyMessageWithLevels ¶
ContainAnyMessageWithLevels a custom Matcher to verify that no message with the any of the given levels was logged
func ContainJSONLog ¶ added in v0.7.0
func ContainJSONLog(level log.Level, msg string) types.GomegaMatcher
ContainJSONLog a custom Matcher to verify that a message at a given level was logged
func ContainJSONLogWithOffset ¶ added in v0.7.0
func ContainJSONLogWithOffset(level log.Level, startOffset int, endOffset int, msg string) types.GomegaMatcher
ContainJSONLogWithOffset a custom Matcher to verify that a message with offset position and at a given level was logged
func MatchDocument ¶ added in v0.4.0
func MatchDocument(expected *types.Document) gomegatypes.GomegaMatcher
MatchDocument a custom matcher to verify that a document matches the given expectation Similar to the standard `Equal` matcher, but display a diff when the values don't match
func MatchDocumentFragment ¶ added in v0.7.0
func MatchDocumentFragment(expected types.DocumentFragment) gomegatypes.GomegaMatcher
MatchDocumentFragment a custom matcher to verify that a document matches the given expectation Similar to the standard `Equal` matcher, but display a diff when the values don't match
func MatchDocumentFragments ¶ added in v0.7.0
func MatchDocumentFragments(expected []types.DocumentFragment) gomegatypes.GomegaMatcher
MatchDocumentFragments a custom matcher to verify that a document matches the given expectation Similar to the standard `Equal` matcher, but display a diff when the values don't match
func MatchHTML ¶ added in v0.4.0
func MatchHTML(expected string) gomegatypes.GomegaMatcher
MatchHTML a custom matcher to verify that a document renders as the given template which will be processed with the given args
func MatchHTMLFromFile ¶ added in v0.7.0
func MatchHTMLFromFile(filename string) gomegatypes.GomegaMatcher
MatchHTMLFromFile a custom matcher to verify that a document renders as the content of the file with the given name
func MatchHTMLTemplate ¶ added in v0.4.0
func MatchHTMLTemplate(expectedTmpl string, data interface{}) gomegatypes.GomegaMatcher
MatchHTMLTemplate a custom matcher to verify that a document renders as the given template which will be processed with the given args
func MatchHTMLTemplateFile ¶ added in v0.7.0
func MatchHTMLTemplateFile(filename string, data interface{}) gomegatypes.GomegaMatcher
MatchHTMLTemplate a custom matcher to verify that a document renders as the given template which will be processed with the given args
func MatchInlineElements ¶ added in v0.5.0
func MatchInlineElements(expected []interface{}) gomegatypes.GomegaMatcher
MatchInlineElements a custom matcher to verify that a document matches the given expectation Similar to the standard `Equal` matcher, but display a diff when the values don't match
func MatchMetadata ¶ added in v0.7.0
func MatchMetadata(expected types.Metadata) gomegatypes.GomegaMatcher
func MatchTableOfContents ¶ added in v0.7.0
func MatchTableOfContents(expected *types.TableOfContents) gomegatypes.GomegaMatcher
MatchTableOfContents a custom matcher to verify that a TableOfContents matches the given expectation Similar to the standard `Equal` matcher, but display a diff when the values don't match
func ParseDocument ¶
ParseDocument parses the actual value into a Document
func ParseDocumentFragments ¶ added in v0.7.0
func ParseDocumentFragments(actual string, options ...parser.Option) ([]types.DocumentFragment, error)
ParseDocumentFragments parses the actual source with the options
func PreparseDocument ¶ added in v0.7.0
func RenderHTML ¶ added in v0.4.0
func RenderHTML(actual string, settings ...configuration.Setting) (string, error)
RenderHTML renders the HTML body using the given source
func RenderHTMLFromFile ¶ added in v0.7.0
func RenderHTMLFromFile(filename string, settings ...configuration.Setting) (string, types.Metadata, error)
RenderHTML renders the HTML body using the given source
func RenderHTMLWithMetadata ¶ added in v0.7.0
func RenderHTMLWithMetadata(actual string, settings ...configuration.Setting) (string, types.Metadata, error)
RenderHTML renders the HTML body using the given source
Types ¶
type ConsoleOutput ¶ added in v0.7.0
type ConsoleOutput struct {
// contains filtered or unexported fields
}
func ConfigureLogger ¶
func ConfigureLogger(level log.Level, opts ...TeeOption) (*ConsoleOutput, func())
func NewConsoleOutput ¶ added in v0.7.0
func NewConsoleOutput() *ConsoleOutput
func (ConsoleOutput) Content ¶ added in v0.7.0
func (t ConsoleOutput) Content() io.Reader
type TeeOption ¶ added in v0.7.0
type TeeOption func(*ConsoleOutput)