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

Test coverage for GitShellOutStrategy #1900

Merged
merged 18 commits into from Jan 12, 2019

Conversation

2 participants
@smashwilson
Copy link
Member

smashwilson commented Jan 10, 2019

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

This adds unit tests to git-strategies.test.js to cover the remaining uncovered lines reported by CodeCov.

Alternate Designs

N/A

Benefits

GitShellOutStrategy is one of the more prevalent culprits in test coverage flapping that we see on unrelated PRs. This is one step toward minimizing those changes and keeping CodeCov output relavent.

Possible Drawbacks

N/A

Applicable Issues

N/A

Metrics

N/A

Tests

Ideally this should raise GitShellOutStrategy's coverage to 100%.

Documentation

N/A

Release Notes

N/A

User Experience Research (Optional)

N/A

@smashwilson smashwilson added this to In Progress 🔧 in Sprint : 9 January 2019 - 12 February 2019 : v0.25.0 via automation Jan 10, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 10, 2019

Codecov Report

Merging #1900 into master will increase coverage by 0.54%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1900      +/-   ##
==========================================
+ Coverage   91.09%   91.64%   +0.54%     
==========================================
  Files         185      185              
  Lines       10719    10672      -47     
  Branches     1575     1563      -12     
==========================================
+ Hits         9765     9780      +15     
+ Misses        954      892      -62
Impacted Files Coverage Δ
lib/git-shell-out-strategy.js 100% <100%> (+12.47%) ⬆️
lib/models/conflicts/side.js 92.18% <0%> (-4.69%) ⬇️
lib/atom/decoration.js 84.33% <0%> (-2.41%) ⬇️
lib/controllers/editor-conflict-controller.js 94.94% <0%> (-1.02%) ⬇️
lib/models/repository-states/present.js 95.02% <0%> (-0.39%) ⬇️

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 4786390...b346a45. Read the comment docs.

smashwilson added some commits Jan 10, 2019

@smashwilson smashwilson force-pushed the aw/gsos-tests branch from cf6aeab to 4860e97 Jan 10, 2019

smashwilson added some commits Jan 10, 2019

@smashwilson

This comment has been minimized.

Copy link
Member Author

smashwilson commented Jan 11, 2019

And 100% coverage for GitShellOutStrategy 👌

@smashwilson smashwilson requested a review from atom/github-package Jan 11, 2019

@smashwilson smashwilson referenced this pull request Jan 11, 2019

Merged

Correct remaining flapping test coverage #1903

4 of 4 tasks complete
@annthurium
Copy link
Contributor

annthurium left a comment

woo!

*/
const EXPAND_TILDE_REGEX = new RegExp('^~([^/]*)/');
const EXPAND_TILDE_REGEX = new RegExp('^~([^\\\\/]*)[\\\\/]');

This comment has been minimized.

@annthurium

annthurium Jan 11, 2019

Contributor

it's so much more...expandy! (I really wanted to come up with a better joke about this but couldn't.)

Show resolved Hide resolved test/git-strategies.test.js
const args = ['interpret-trailers'];
if (unfold) {

This comment has been minimized.

@annthurium

annthurium Jan 11, 2019

Contributor

good catch on this unused param

it('propagates unexpected git errors', async function() {
const workingDirPath = await cloneRepository('three-files');
const git = createTestStrategy(workingDirPath);
sinon.stub(git, 'exec').rejects(new Error('AHHHH'));

This comment has been minimized.

@annthurium

annthurium Jan 11, 2019

Contributor

a+ fake error names in this pull request

Sprint : 9 January 2019 - 12 February 2019 : v0.25.0 automation moved this from In Progress 🔧 to QA Review 🔬 Jan 11, 2019

@smashwilson smashwilson merged commit 337e620 into master Jan 12, 2019

2 checks passed

codecov/patch 100% of diff hit (target 91.09%)
Details
codecov/project 91.64% (+0.54%) compared to 4786390
Details

Sprint : 9 January 2019 - 12 February 2019 : v0.25.0 automation moved this from QA Review 🔬 to Merged ☑️ Jan 12, 2019

@smashwilson smashwilson deleted the aw/gsos-tests branch Jan 12, 2019

@kuychaco kuychaco referenced this pull request Feb 4, 2019

Closed

v0.25.0-0 QA Review #1936

14 of 18 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.