Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

RelativePortal unit testing . #20

Closed
raku1089 opened this issue Apr 11, 2018 · 2 comments
Closed

RelativePortal unit testing . #20

raku1089 opened this issue Apr 11, 2018 · 2 comments

Comments

@raku1089
Copy link

can any one suggest how to write unit test for RelativePortal.
challenge - unable to find component or any html tags written inside RelativePortal.
<RelativePortal component="div" > <div><OtherComponent/></div> </RelativePortal>
test :
const wrapper =mount(<MyComponent />); wrapper.find(<OtherComponent/>) or wrapper.find('OtherComponent') tried didn't working out
I am using tape plus, enzyme for testing.

@DragorWW
Copy link
Contributor

@raku1089 you can find it only in document.querySelector()

@sunify
Copy link
Owner

sunify commented Apr 11, 2018

Also, this discussion can be helpful — enzymejs/enzyme#252

@sunify sunify closed this as completed Feb 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants