paint-brush
How 'displayName' Helps In Testing React Using Styled Componentsby@anuradha15
3,338 reads
3,338 reads

How 'displayName' Helps In Testing React Using Styled Components

by Anuradha Kumari2mApril 10th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

How 'displayName' Helps In Testing React Using Styled Components reads: "How to get rid of the weird styled component names in test snapshots" Anuradha Kumari is a Frontend Consultant, Accessibility advocate and front-end consultant. The displayName provided by React is a recommended feature which helps a lot with unit testing as well as debugging the code. We can solve all the issues as mentioned above by just specifying displayName for all the styled components in the test file.

Company Mentioned

Mention Thumbnail
featured image - How 'displayName' Helps In Testing React Using Styled Components
Anuradha Kumari HackerNoon profile picture
Anuradha Kumari

Anuradha Kumari

@anuradha15

Frontend Consultant, GDE, MVP, MDE, Accessibility advocate, https://anuradhakumari.com/

About @anuradha15
LEARN MORE ABOUT @ANURADHA15'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Anuradha Kumari HackerNoon profile picture
Anuradha Kumari@anuradha15
Frontend Consultant, GDE, MVP, MDE, Accessibility advocate, https://anuradhakumari.com/

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite