Comparing expected vs actual only shows the diff a few levels deep?
See original GitHub issueVery similar to this PR - https://github.com/jfairbank/redux-saga-test-plan/pull/314
It seeems that the diff between the expected and actual output only goes a few levels deep (arbitrarily set at 4 from that PR, not sure if it’s been changed since). This can make it difficult to see where the actual assertion is failing.
Simple contrived example. Note the data
property is an array of objects - with some values inside failing the assertion, but the user can’t visually see which ones.
Expected
--------
{ '@@redux-saga/IO': true,
combinator: false,
type: 'PUT',
payload:
{ channel: undefined,
action:
{ type: 'MY_ACTION',
payload: { data: [Object] }
}
}
}
Actual:
------
{ '@@redux-saga/IO': true,
combinator: false,
type: 'PUT',
payload:
{ channel: undefined,
action:
{ type: 'MY_ACTION',
payload: { data: [Object] }
}
}
}
Could we consider the diff to recurse down all levels to show the true full diff? Or at least make the depth level parameterized to accept more depth values?
Please let me know if I’m just overlooking something simple in the docs. Or please let me know if I can make a PR with the proposed change.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5
+1
This issue should be solved by @AdeonMaster