Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Publish error handling #45

Merged
merged 3 commits into from
May 16, 2019
Merged

Conversation

Blackbaud-BobbyEarl
Copy link

No description provided.

@codecov-io
Copy link

codecov-io commented May 16, 2019

Codecov Report

Merging #45 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #45   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines         177    184    +7     
=====================================
+ Hits          177    184    +7
Impacted Files Coverage Δ
lib/publish.js 100% <100%> (ø) ⬆️

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 a23e3e8...1081036. Read the comment docs.

throw error;
});

try {

Choose a reason for hiding this comment

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

I think you want to call await expectAsync(...).toBeRejectedWith(...) here. The problem with the test as it's written is that if callPublish() doesn't throw an error, then no expects get called and the test will pass. See lib-deploy.spec.js for examples of how to use it. https://github.com/blackbaud/skyux-deploy/blob/master/test/lib-deploy.spec.js#L73

Copy link
Author

@Blackbaud-BobbyEarl Blackbaud-BobbyEarl May 16, 2019

Choose a reason for hiding this comment

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

Yup, I did a bad job of searching for toBeRejectedWith. I'll update.

beforeEach(() => {
loggerMock = jasmine.createSpyObj('logger', ['info', 'error', 'bobby']);

Choose a reason for hiding this comment

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

What's bobby used for?

Choose a reason for hiding this comment

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

To maintain my presence in this repo. J/K, I was debugging. I'll remove it.

@Blackbaud-BobbyEarl Blackbaud-BobbyEarl merged commit f577207 into master May 16, 2019
@Blackbaud-BobbyEarl Blackbaud-BobbyEarl deleted the publish-error-handling branch May 16, 2019 18:26
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