Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diffs for arrays of strings can be pretty confusing #1521

Open
lukechilds opened this issue Sep 16, 2017 · 1 comment
Open

Diffs for arrays of strings can be pretty confusing #1521

lukechilds opened this issue Sep 16, 2017 · 1 comment
Labels
bug current functionality does not work as desired help wanted scope:assertions scope:reporters

Comments

@lukechilds
Copy link
Contributor

If you do t.deepEqual (and I think also t.is) on two arrays containing strings. If there are a large amount of strings and they only differ slightly the output is very confusing. It appears that as soon as a new entry in an array has shifted the items after it across, AVA text diffs every single entry against the same index in the original array.

e.g: An array with 219 strings that has had 6 additions and 1 deletion:
AVA diff: https://travis-ci.org/lukechilds/window/jobs/266859856
GitHub diff: lukechilds/window@6ecbade

@novemberborn
Copy link
Member

Yea I would have expected the GitHub diff. Would you be able to share an isolated test case at https://github.com/concordancejs/concordance?

There's an existing issue for improving string diffs, but the issue here seems to be that Concordance isn't correctly detecting missing / extraneous array items. But still, see concordancejs/concordance#29 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug current functionality does not work as desired help wanted scope:assertions scope:reporters
Projects
None yet
Development

No branches or pull requests

2 participants