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
Attaching the component under test to the document solves some common problems like form submission and clicks on checkboxes (see warning at the end). In fact, if you search for 'attachTo' in the project issues, there are lot of people that have problems because of it not being set. So, I wonder why it isn't the default if it makes test easier to write and more reliable. I guess there might be some drawbacks that made the project default to leave it not set, but I haven't found any explanation in the documentation. I was thinking of setting it globally in my project, but before I'd like to know of the possible consequences. Could someone shed some light on this?
Something similar happens with enableAutoUnmount, which causes some tests to fail if the component isn't unmounted after each test.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Attaching the component under test to the document solves some common problems like form submission and clicks on checkboxes (see warning at the end). In fact, if you search for 'attachTo' in the project issues, there are lot of people that have problems because of it not being set. So, I wonder why it isn't the default if it makes test easier to write and more reliable. I guess there might be some drawbacks that made the project default to leave it not set, but I haven't found any explanation in the documentation. I was thinking of setting it globally in my project, but before I'd like to know of the possible consequences. Could someone shed some light on this?
Something similar happens with
enableAutoUnmount, which causes some tests to fail if the component isn't unmounted after each test.Beta Was this translation helpful? Give feedback.
All reactions