-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
jest-diff: Remove the need to export splitLines0 function #9151
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9151 +/- ##
==========================================
+ Coverage 64.77% 64.81% +0.04%
==========================================
Files 277 277
Lines 11724 11730 +6
Branches 2879 2881 +2
==========================================
+ Hits 7594 7603 +9
+ Misses 3512 3511 -1
+ Partials 618 616 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonderful 👍
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Let callers of
diffLinesUnified
anddiffLinesUnified2
usesplit
method, because it is a private implementation issue that''.split('\n')
is['']
instead of[]
But callers of
diffLinesRaw
must decide whether['']
or[]
has correct meaning for their applicationsIn
README.md
file, move information:Edge cases of diffLinesUnified or diffStringsUnified
Edge case of diffLinesRaw
This is not a breaking change, because the export was never published
Test plan
In
diff.tests.ts
diff.test.ts
to cover new conditionsfirstOrLastEmptyLineReplacement
withemptyFirstOrLastLinePlaceholder default empty string