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

fix: displayName being undefined while creating snapshot #17

Conversation

Syed-Ali-Abbas-Zaidi
Copy link
Contributor

displayName is undefined while creating a snapshot during the enzyme to react-unit-test-utils migration.

Screenshot 2023-12-26 at 3 58 33 PM

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e574cc6) 87.03% compared to head (8a36b2a) 87.03%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #17   +/-   ##
=======================================
  Coverage   87.03%   87.03%           
=======================================
  Files           7        7           
  Lines          54       54           
  Branches        5        5           
=======================================
  Hits           47       47           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Syed-Ali-Abbas-Zaidi
Copy link
Contributor Author

Hi, @muselesscreator! Could you please review this fix? It is blocking enzyme deprecation. Thank you.

Copy link
Contributor

@muselesscreator muselesscreator left a comment

Choose a reason for hiding this comment

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

I actually think this is a mistake

@muselesscreator
Copy link
Contributor

Closed after sending the creator a message with an alternative. The displayName is how the snapshot names its components, and is created for every jsx object. The issue with the given tests appears to be in the mocking of sub-components.

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.

2 participants