-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: Refactor and add tests for load-mock #53302
Conversation
add more functions and move logic into a module that can have tests.
Refactor load-mocks into a set of smaller functions, and have some high level tests to ensure that load-mocks will run. These tests aren't exhaustive but they should help us catch and prevent regressions in load-mocks in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff is hard to follow, but that's understandable, it has no tests and is a dev tool. So I'm taking your word that this works locally, I do think the approach is good 👍
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #53302 +/- ##
==========================================
+ Coverage 79.51% 79.54% +0.02%
==========================================
Files 4939 4941 +2
Lines 208029 208431 +402
Branches 35474 35521 +47
==========================================
+ Hits 165422 165787 +365
- Misses 37569 37595 +26
- Partials 5038 5049 +11
|
I think having a few type:ignore is better than ignore the entire file.
Ran this locally before merging and it runs cleanly. |
Refactor load-mocks into a set of smaller functions, and have some high level tests to ensure that load-mocks will run. These tests aren't exhaustive but they should help us catch and prevent regressions in load-mocks in the future.
Refactor load-mocks into a set of smaller functions, and have some high level tests to ensure that load-mocks will run. These tests aren't exhaustive but they should help us catch and prevent regressions in load-mocks in the future.