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 test coverage of executable spawn #1474

Merged
merged 2 commits into from Feb 17, 2021

Conversation

shadowspawn
Copy link
Collaborator

Pull Request

Problem

We don't have much coverage of the executable launching details in the Jest coverage results, especially error cases.

Note: we do have multiple executable tests that aren't captured by the Jest coverage.

Solution

Add tests which mock spawn to allow injecting errors in more controlled fashion. These test failure paths rather than happy paths, are not end-to-end tests, but provide some coverage of existing behaviours.

(I am still interested to see if we can include more of the existing tests in the Jest coverage results too.)

Increases Jest coverage from ~98% to ~99%.

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

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

great!

@shadowspawn shadowspawn merged commit 948796d into tj:develop Feb 17, 2021
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Feb 17, 2021
@shadowspawn shadowspawn deleted the feature/mock-coverage branch February 17, 2021 08:39
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants