-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Base reporter, add unified diff separator #2295
Comments
Git has a format something like this: |
hmm - the problem with generating line numbers is that these diffs are for formatted objects, thus line numbers don't seem appropriate. However I did notice Edit: especially if they were colored something beside green/red |
@olsonpm Can you show what should be output? |
I am a bot that watches issues for inactivity. |
@boneskull - trying to prevent the issue from being closed. I provided the requested feedback, so at least remove that label please. |
I'd be fine with just |
unexpected may have a good solution we can pilfer; let's take a look at what their messaging looks like. Otherwise, @ScottFreeCode I don't think this needs an option to change the separator, and a flag also feels like overkill. If we're erring on the site of caution, this is |
Sweet - I'll get a pr in next week. Thanks for the responses. |
- fix issue mochajs#2295 - the purpose of this feature is to make the unified diff format more readable. Without it, different portions of the same actual/expected diff look contiguous even though they are actually separated by the default context of four lines.
- fix issue mochajs#2295 - the purpose of this feature is to make the unified diff format more readable. Without it, different portions of the same actual/expected diff look contiguous even though they are actually separated by the default context of four lines.
- fix issue #2295 - the purpose of this feature is to make the unified diff format more readable. Without it, different portions of the same actual/expected diff look contiguous even though they are actually separated by the default context of four lines.
This went out in 4; thanks again! |
- fix issue mochajs#2295 - the purpose of this feature is to make the unified diff format more readable. Without it, different portions of the same actual/expected diff look contiguous even though they are actually separated by the default context of four lines.
Right now the unified diff output has no separators. Resulting in output similar to this:
Having not used mocha in some time, I had completely forgotten it splits before/after 4 lines from the affected text and spent a while trying to figure out how "PD" could possibly be having values of "15/30" or "50/100".
I don't know what kind of separator to add, but a blank line or two should suffice for majority of cases. I'd have to check to see if other libraries have tackled this problem how they went about it.
The code to modify would be this:
mocha/lib/reporters/base.js
Lines 161 to 207 in 7493bca
The text was updated successfully, but these errors were encountered: