Open piotr-s-brainhub opened 6 years ago
Edit: The answer is yes:
chai.config.showDiff = true
chai.config.truncateThreshold = 0
Relevant code: https://github.com/debitoor/chai-subset/blob/master/lib/chai-subset.js#LL18C31-L18C39
Old question:
Is there an option to enable this diff, we're using the same version of chai-subset
but with chai
4.3 and I only see the following message:
expected { Object (foo1, foo2, ...) } to contain subset { foo5: some other value }
Currently we're using jest-diff to generate the diff message but it's also really noisy for some of our uses case so I'd love if we could just have a diff of the subset expectations instead.
OS: Mac OS X 10.12.6 Node.js: 8.9.4 chai: 3.5.0 chai-subset: 1.6.0 mocha: 3.5.3
I have the following test:
The actual output:
I would like the following output:
In case of nested objects it should show the full path to a non-matching fields so e.g.,