Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@smashwilson
Copy link
Contributor

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

@codecov
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
Copy link
Contributor Author

And 100% coverage for GitShellOutStrategy 👌

@smashwilson smashwilson requested a review from a team January 11, 2019 14:52
Copy link

@annthurium annthurium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woo!

* ([^\\\\/]*)[\\\\/] captures non-slash characters before first slash
*/
const EXPAND_TILDE_REGEX = new RegExp('^~([^/]*)/');
const EXPAND_TILDE_REGEX = new RegExp('^~([^\\\\/]*)[\\\\/]');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

mergeTrailers(commitMessage, trailers, unfold) {
mergeTrailers(commitMessage, trailers) {
const args = ['interpret-trailers'];
if (unfold) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a+ fake error names in this pull request

@smashwilson smashwilson merged commit 337e620 into master Jan 12, 2019
@smashwilson smashwilson deleted the aw/gsos-tests branch January 12, 2019 16:44
@kuychaco kuychaco mentioned this pull request Feb 4, 2019
18 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants