Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Formatting matcher output #37

@onsi

Description

@onsi

Originally from onsi/ginkgo#73

This may already be implemented, I just haven't found it.

When I have an expectation like this:

Expect(something).ToNot(BeNil())

If it fails, it logs a deep inspection of something. I find that in many cases this leads to overwhelming output. For example, one of my structures includes a time.Time. This is (surprisingly) over 250 of output due to a massive DST lookup table that's included in its loc field. Some of my data structures include http or file handles that can generate thousands of lines of output (sometimes recursively, leading to hundreds of "too deep for me, man" messages).

I had assumed that I could implement Stringer or GoStringer to control the logging output, but Ginkgo doesn't seem to use these. Is there any way to get control over how complex structures are displayed?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions