3

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?

Chris Root
  • 617
  • 6
  • 16
  • Possible duplicate of [How to pass context down to the Enzyme mount method to test component which includes Material UI component?](https://stackoverflow.com/questions/38264715/how-to-pass-context-down-to-the-enzyme-mount-method-to-test-component-which-incl) – ArthurDenture Jun 19 '17 at 15:06

1 Answers1

1

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

Thomas John
  • 2,138
  • 2
  • 22
  • 38