Skip to content

HTML Reporter: Fixed the confusing Line Breaks in Diffs#764

Closed
gauravmittal1995 wants to merge 1 commit into
qunitjs:masterfrom
gauravmittal1995:diff_new_line
Closed

HTML Reporter: Fixed the confusing Line Breaks in Diffs#764
gauravmittal1995 wants to merge 1 commit into
qunitjs:masterfrom
gauravmittal1995:diff_new_line

Conversation

@gauravmittal1995

Copy link
Copy Markdown
Contributor

Regarding #348
In the Below picture:
1st assert has same keys but different values,
2nd assert is for two strings,
3rd assert has different keys but similar values.

diff_pic

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@leobalter @jzaefferer Please Review

@jzaefferer

Copy link
Copy Markdown
Member

Can you provide a screenshot of those same diffs without the changes of this PR applied?

@jzaefferer

Copy link
Copy Markdown
Member

Also #348 had an example where an object was replaced by an array. Could you cover that as well?

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@jzaefferer for the object replaced by array:

list_array

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

Now for without the change (i.e originally):

pic1
pic2

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@jzaefferer Hey, I also tried another way and got the following diff:

new_diff1
new_diff2

Please Let me know which one according to you is better.

@jzaefferer

Copy link
Copy Markdown
Member

Both approaches are definitely an improvement over the current implementation. The "another way" looks even better to me. We may need more tests to avoid regressions though.

@leobalter what do you think?

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@jzaefferer the another way uses google's diff-patch-match library.

@jzaefferer

Copy link
Copy Markdown
Member

Ah, good to know. Could you create a separate PR for that?

@leobalter

Copy link
Copy Markdown
Member

I liked these changes, but I would like to see this other PR as it looks better.

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@jzaefferer @leobalter Creating the new PR. Its taking time because have to refactor as it doesnt use cameCase and vars are scattered throughout the function. Will send it soon

@leobalter

Copy link
Copy Markdown
Member

As it is an external library, it would be good to ignore it on jshint and jscs checks. Also, getting the code from a npm dependency would be nice.

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@leobalter @jzaefferer PR opened #772

@gauravmittal1995

Copy link
Copy Markdown
Contributor Author

@jzaefferer I think its safe to close this PR as we r mostly gonna stick with #772 ??

@leobalter

Copy link
Copy Markdown
Member

Yes, @gauravmittal1995, thanks!

@leobalter leobalter closed this Mar 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants