commit | f50d3b2201a70fcd9ba25d7192750f8687dcb5c6 | [log] [tgz] |
---|---|---|
author | Eric Tsiliacos and Tim Jarratt <tjarratt@pivotal.io> | Fri Jan 13 10:04:28 2017 -0800 |
committer | Eric Tsiliacos and Tim Jarratt <tjarratt@pivotal.io> | Fri Jan 13 10:04:28 2017 -0800 |
tree | 36eac37430d2bd63abb2e85c0b67405be2826a1c | |
parent | f1f0f388b31eca4e2cbe7a6dd8a3a1dfddda5b1c [diff] |
Attempt to diff long strings when not equal Our goal in this PR was to improve the UX for Equal() when both expected and actual are very, very long strings. Long strings (with more than 50 characters) that are not equal are typically hard to visually diff when your tests fail. This change attempts to find the very first mismatch in the strings and to visually point out where the diff is. It additionally truncates the text, so it is easier to see the exact point. Assumptions: * people only need ~5 characters around the diff to identify WHERE it is * 50 characters is a reasonable threshold for deciding to diff strings in this manner * Equal() is the only matcher that needs this treatment (for now) Would love feedback on these assumptions, or anything else.
Jump straight to the docs to learn about Gomega, including a list of all available matchers.
To discuss Gomega and get updates, join the google group.
Learn more about Ginkgo here
A collection of community matchers is available on the wiki.
Gomega is MIT-Licensed
The ConsistOf
matcher uses goraph which is embedded in the source to simplify distribution. goraph has an MIT license.