Skip to content

Support colored output #161

@gavv

Description

@gavv

Modify DefaultFormatter to support colorized output.

It should provide three color modes, controlled by an option:

  • auto (used by default) - enable colors if testing.Verbose() is true and stdout is a tty / console
  • always - always use colors
  • never - never use colors

Color support should work for both unix and windows.

Colors should be injected into failure template using template functions, but should not be present in FormatData. This way users that use DefaultFormatter with custom templates won't be affected.

Metadata

Metadata

Assignees

Labels

featureNew feature or requesthelp wantedContributions are welcome

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions