diff --git a/website/docs/shallow/constructor.md b/website/docs/shallow/constructor.md index 29f513a..6656680 100644 --- a/website/docs/shallow/constructor.md +++ b/website/docs/shallow/constructor.md @@ -11,4 +11,32 @@ The option object is a way to passing property or some other informations to bui Here is the list of available options: -- {Object} `props` The key is the property name, and the value his value. +- {Object} `mocks` The key is the property name, and the value his value. + +### Examples + +#### react + +```jsx +const ChildComponent = ({nbLikes}) => { + return ; +}; + +const Component = () => { + return ( +
+ +
+ ); +}; + +const cmp = shallow(, { + mock: { + ChildComponent + } +}); + +expect(cmp.html()).toBe( + '
' +); +```