I have a failing unit test that is comparing two large arrays, and the output from mocha is partially skipped.
"Qualifying/Commissions/Amount"
"Qualifying/Other/Amount"
"Qualifying/Overtime/Amount"
"Qualifying/Total/Amount"
- "Factors/De/ ... Lines skipped
+ "Factors/De/Base/Amount"
+ "Factors/De/Bo ... Lines skipped
How do I get more of the lines that were skipped? Pytest has a -v option for verbose.
This is the result of calling
expect(actual).to.deep.equal(expected)
where actual and expected are big ol' arrays of strings.
Versions:
"mocha": "^9.0.3",
"sinon-chai": "^3.5.0",
"chai": "~4.1",
If you see this you need to update mocha to at least v9.2.1 and then you can use --reporter-option maxDiffSize=0
From the docs:
New in v9.2.1
By default strings are truncated to 8192 characters before generating a diff. This is to prevent performance problems with large strings.
It can however make the output harder to interpret when comparing large strings. Therefore it is possible to configure this value using --reporter-option maxDiffSize=[number].
A value of 0 indicates no limit, default is 8192 characters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With