question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comparing expected vs actual only shows the diff a few levels deep?

See original GitHub issue

Very 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:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

3reactions
rajjeetcommented, Feb 21, 2020

+1

2reactions
jp928commented, Mar 15, 2021

This issue should be solved by @AdeonMaster

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Confidence Intervals to Compare Means - Statistics by Jim
To determine whether the difference between two means is statistically significant, analysts often compare the confidence intervals for those groups.
Read more >
3.2 How to test for differences between samples
An “alternative hypothesis” (H1 H 1 ) is that there is a difference between the samples. Decide on a statistic to test the...
Read more >
Comparing More Than Two Means: One-Way ANOVA
If ANOVA shows that the means aren't all equal, then which means are unequal, and by how much? There are many ways to...
Read more >
Difference-in-Difference Estimation | Columbia Public Health
The Difference-in-Difference estimation is a longitudinal study and is also known as the "controlled before-and-after study.
Read more >
How to do a deep comparison between 2 objects with lodash?
If you need to know what the differences are, there's no obvious way to list them, but this answer is pretty good, just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found