-
Notifications
You must be signed in to change notification settings - Fork 513
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
Migrate ScoreCard.test.js from Enzyme to React Shallow Renderer #1653
Conversation
Signed-off-by: Ansh Goyal <[email protected]>
Signed-off-by: Ansh Goyal <[email protected]>
please address comments in #1643 |
@yurishkuro About the @testing-library/react @testing-library/jest-dom deps, they don't need to be installed for the scope of this PR, but as we are using two functions from Enzyme, |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1653 +/- ##
=======================================
Coverage 96.01% 96.01%
=======================================
Files 241 241
Lines 7558 7558
Branches 1984 1984
=======================================
Hits 7257 7257
Misses 301 301 ☔ View full report in Codecov by Sentry. |
@yurishkuro Could you please also check this one. |
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Ansh Goyal <[email protected]>
Signed-off-by: Ansh Goyal <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. |
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.
my bad, I should've used formatted versions, just pushed an update
@@ -0,0 +1,102 @@ | |||
// Copyright (c) 2023 The Jaeger Authors | |||
// Adopted from https://thesametech.com/snapshot-testing-in-rtl/ | |||
// Copyright (c) 2023 Ildar Sharafeev |
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.
Author's permission in this comment: #1653 (comment)
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Nice job! |
Which problem is this PR solving?
ScoreCard.test.js
from Enzyme to React Testing LibraryDescription of the changes
How was this change tested?
yarn test -- -u
to re-generate snapshots of the changed testsyarn test-ci ScoreCard.test.js --coverage
was used to check if all tests pass and coverage is 100%Checklist