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

Increase coverage in jest-diff #4583

Merged
merged 2 commits into from
Oct 2, 2017
Merged

Conversation

pedrottimark
Copy link
Contributor

Summary

Before designing new tests for char diff:

  • cover last uncovered line in diff_strings.js
  • cover one additional line in index.js but leave 6 related to asymmetric matcher

In diff.test.js

  • Factored out const NO_DIFF_MESSAGE = 'Compared values have no visual difference.';
  • Moved toJSON function from module scope to describe block where it is used

Test plan

  • Added unexpanded tests under no visual difference to hit if (hunks.length === 0) { return null; } in diff_strings.js
  • Deleted one test under oneline strings that is redundant with no visual difference
  • Added tests under refactored falls back to not call toJSON to hit catch (e) { hasThrown = true; } in index.js

@codecov-io
Copy link

codecov-io commented Oct 2, 2017

Codecov Report

Merging #4583 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4583      +/-   ##
==========================================
+ Coverage   55.65%   55.68%   +0.03%     
==========================================
  Files         186      186              
  Lines        6348     6348              
  Branches        3        3              
==========================================
+ Hits         3533     3535       +2     
+ Misses       2814     2812       -2     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-diff/src/diff_strings.js 100% <0%> (+1.16%) ⬆️
packages/jest-diff/src/index.js 84.09% <0%> (+2.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d355b3b...3c33616. Read the comment docs.

@cpojer cpojer merged commit 7aa3017 into jestjs:master Oct 2, 2017
@pedrottimark pedrottimark deleted the jest-diff-coverage branch October 2, 2017 19:10
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants