marick / Midje

Midje provides a migration path from clojure.test to a more flexible, readable, abstract, and gracious style of testing
MIT License
1.69k stars 129 forks source link

Colorize expected and actual outputs #403

Closed philomates closed 7 years ago

philomates commented 7 years ago

Version of @denisidoro's PR https://github.com/marick/Midje/pull/382 with tests adapted to disregard ANSI text coloring codes

denisidoro commented 7 years ago

🚢 ?

philomates commented 7 years ago

I'm going to merge this now and do an alpha release so everyone can get to using this. I'll soon follow up with a PR that allows you to turn off this functionality in case you prefer non-pretty printed output (just like in requested for this PR https://github.com/marick/Midje/pull/402#issuecomment-327527547)

pjlegato commented 7 years ago

This looks great! Would it be possible to get something similar for the output of Checking function:, Best match found:, and It matched:?

pjlegato commented 7 years ago

Even more awesome would be if it could do a diff on expected versus actual, and highlight the parts that differed somehow.... I often have complex nested maps as checker results, which currently have to be sifted through manually. That'd be a huge timesaver.