Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

confused about Enzyme mount() context options

Tags:

reactjs

enzyme

I am trying to test a React component with Mocha/Enzyme which relies on a child component and one of it's child components as part of the test. I get an error related to this. My question (for now) isn't about the error but about the "context" options of mount().

I can't find anywhere where these options are explained in any reasonable detail. I don't know what values they are supposed to take and how they relate to my components. Is there a tutorial somewhere, a blog post or something which explains these options for mount() in detail?

like image 725
Chris Root Avatar asked Nov 25 '25 17:11

Chris Root


1 Answers

https://github.com/airbnb/enzyme/blob/master/docs/api/mount.md Is this what you need to perform?

like image 97
Thomas John Avatar answered Nov 27 '25 09:11

Thomas John