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

Check that mocks were called #610

Merged
merged 6 commits into from
Dec 30, 2019
Merged

Check that mocks were called #610

merged 6 commits into from
Dec 30, 2019

Conversation

mjoyce91
Copy link

These types of tests have always helped with code coverage, but don't give us insight into whether the mock requests were actually called. This is a way we could do that somewhat easily. Looking for feedback.

@mjoyce91 mjoyce91 added the help wanted Extra attention is needed label Dec 18, 2019
@burgwyn
Copy link

burgwyn commented Dec 18, 2019

Before

=============================== Coverage summary ===============================
Statements   : 96.09% ( 7710/8024 )
Branches     : 82.74% ( 3303/3992 )
Functions    : 94.66% ( 2413/2549 )
Lines        : 96.32% ( 7361/7642 )
================================================================================

Test Suites: 458 passed, 458 total
Tests:       5 skipped, 2092 passed, 2097 total
Snapshots:   412 passed, 412 total
Time:        165.886s
Ran all test suites.
✨  Done in 167.42s.

After

=============================== Coverage summary ===============================
Statements   : 96.04% ( 7717/8035 )
Branches     : 82.68% ( 3307/4000 )
Functions    : 94.56% ( 2417/2556 )
Lines        : 96.27% ( 7366/7651 )
================================================================================

Test Suites: 458 passed, 458 total
Tests:       5 skipped, 2092 passed, 2097 total
Snapshots:   412 passed, 412 total
Time:        169.7s
Ran all test suites.
✨  Done in 173.11s.

@mjoyce91
Copy link
Author

@burgwyn probably has to do with coverage on the testUtilities file. This PR is less about coverage and more about writing good tests.

@mjoyce91 mjoyce91 removed the help wanted Extra attention is needed label Dec 19, 2019
Copy link

@rtirserio rtirserio left a comment

Choose a reason for hiding this comment

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

👍

@mjoyce91 mjoyce91 merged commit 94e8574 into dev Dec 30, 2019
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.

3 participants