Can the Fragment tag be enabled to support data-testid ? #569
-
Beta Was this translation helpful? Give feedback.
Answered by
gnapse
Jan 19, 2024
Replies: 1 comment
-
The jest-dom is not React-specific. It is not even React-aware. It is only DOM-aware. If something in React does not add anything to the DOM, it cannot have |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gnapse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Fragment
React element does not render anything to the DOM (not even an empty tag, whatever that means).jest-dom is not React-specific. It is not even React-aware. It is only DOM-aware. If something in React does not add anything to the DOM, it cannot have
data-
attributes.