Jest Throws A Warning - ValidateDOMNesting(...): Cannot Appear ...
Trang chủ » Html Cannot Appear As A Child Of Div
» Jest Throws A Warning - ValidateDOMNesting(...):
Cannot Appear ...
Có thể bạn quan tâm
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} testing-library / react-testing-library Public - Notifications You must be signed in to change notification settings
- Fork 1.2k
- Star 19.5k
- Code
- Issues 62
- Pull requests 13
- Actions
- Security
Uh oh!
There was an error while loading. Please reload this page.
- Insights
Additional navigation options - Code
- Issues
- Pull requests
- Actions
- Security
- Insights
Jest throws a warning - validateDOMNesting(...): <td> cannot appear as a child of <div>. #515New issueCopy linkNew issueCopy linkClosedClosedJest throws a warning - validateDOMNesting(...): <td> cannot appear as a child of <div>.#515Copy link
Description
karthikvt26opened on Oct 30, 2019Issue body actions - react-testing-library version: 9.3.0
- react version: 16.9.0
- node version: 10.16.3
- npm (or yarn) version: 6.9.0 (npm)
Relevant code or config:
App is created using create-react-app, assuming it is using a default jest configuration
What you did:
const { container } = render( <td>Hello World</td> ); expect(container).toBeTruthy(); What happened:
The above works but jest throws a warning because render seems to render the stuff inside a <div> -- in this case td ... inside a div.

Reproduction:
Problem description:
I am not sure if this is a problem. But looking forward to understand the behaviour and if it is intended and if yes would love to know the reason :)
Suggested solution:
👍React with 👍3barrymichaeldoyle, tiagobarros01 and TH-VFMetadata
Metadata
Assignees
No one assignedLabels
No labelsNo labelsType
No typeProjects
No projectsMilestone
No milestoneRelationships
None yetDevelopment
No branches or pull requestsIssue actions
You can’t perform that action at this time.
Từ khóa » Html Cannot Appear As A Child Of Div
-
ValidateDOMNesting(...): Cannot Appear As A Child Of
-
ValidateDOMNesting(...): Cannot Appear As A Child Of
-
ValidateDOMNesting(...): Cannot Appear As A Child Of - Dtuto
-
How Can I Solve This Problem In My Jsx?, "Cannot Appear As A Child ...
-
23 - Warning: ValidateDOMNesting(...):cannot Appear As A Child
-
React DOM Elements Should Be Nested Properly - Rule | DeepScan
-
How To Fix The "REACT ERROR Th Cannot Appear As A Child Of Thead ...
-
ValidateDOMNesting(...): Cannot Appear As A Child Of
-
Cannot Appear As A Child Of . At Body At Header
-
ValidateDOMNesting(...): Cannot Appear As A Descendant Of
-
React Cannot Appear As A Child Of Warning-Reactjs
-
Col Cannot Appear As A Child Of Table, Warning
-
How To Fix Warning: ValidateDOMNesting(…): Cannot Appear As A ...
-
ValidateDOMNesting(...): Cannot Appear As A Child Of .
Liên Hệ
TRUYỀN HÌNH CÁP SÔNG THU ĐÀ NẴNG
Địa Chỉ: 58 Hàm Nghi - Đà Nẵng
Phone: 0905 989 xxx
Facebook: https://fb.com/truyenhinhcapsongthu/
Twitter: @ Capsongthu
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu
Trang chủ » Html Cannot Appear As A Child Of Div » Jest Throws A Warning - ValidateDOMNesting(...):
Có thể bạn quan tâm
- Notifications You must be signed in to change notification settings
- Fork 1.2k
- Star 19.5k
- Code
- Issues 62
- Pull requests 13
- Actions
- Security
Uh oh!
There was an error while loading. Please reload this page.
- Insights
- Code
- Issues
- Pull requests
- Actions
- Security
- Insights
Description
- react-testing-library version: 9.3.0
- react version: 16.9.0
- node version: 10.16.3
- npm (or yarn) version: 6.9.0 (npm)
Relevant code or config:
App is created using create-react-app, assuming it is using a default jest configuration
What you did:
const { container } = render( <td>Hello World</td> ); expect(container).toBeTruthy();What happened:
The above works but jest throws a warning because render seems to render the stuff inside a <div> -- in this case td ... inside a div.

Reproduction:
Problem description:
I am not sure if this is a problem. But looking forward to understand the behaviour and if it is intended and if yes would love to know the reason :)
Suggested solution:
👍React with 👍3barrymichaeldoyle, tiagobarros01 and TH-VFMetadata
Metadata
Assignees
No one assignedLabels
No labelsNo labelsType
No typeProjects
No projectsMilestone
No milestoneRelationships
None yetDevelopment
No branches or pull requestsIssue actions
You can’t perform that action at this time.Từ khóa » Html Cannot Appear As A Child Of Div
-
ValidateDOMNesting(...):
Cannot Appear As A Child Of ValidateDOMNesting(...):
Cannot Appear As A Child Of ValidateDOMNesting(...):
Cannot Appear As A Child Of - DtutoHow Can I Solve This Problem In My Jsx?, "Cannot Appear As A Child ...
23 - Warning: ValidateDOMNesting(...):cannot Appear As A Child
React DOM Elements Should Be Nested Properly - Rule | DeepScan
How To Fix The "REACT ERROR Th Cannot Appear As A Child Of Thead ...
ValidateDOMNesting(...):
Cannot Appear As A Child OfCannot Appear As A Child Of
. At Body At HeaderValidateDOMNesting(...):
Cannot Appear As A Descendant OfReact
Cannot Appear As A Child OfWarning-Reactjs Col Cannot Appear As A Child Of Table, Warning
How To Fix Warning: ValidateDOMNesting(…): Cannot Appear As A ...
ValidateDOMNesting(...):
Cannot Appear As A Child Of .
Liên Hệ
TRUYỀN HÌNH CÁP SÔNG THU ĐÀ NẴNG
Địa Chỉ: 58 Hàm Nghi - Đà Nẵng
Phone: 0905 989 xxx
Facebook: https://fb.com/truyenhinhcapsongthu/
Twitter: @ Capsongthu
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu