UNPKG

react-unit-test-generator

Version:

react-unit-test-generator is a helper for writing unit tests for React apps. Its main goal is to automatically generate a suite of the most common test cases for a given component.

8 lines (7 loc) 169 B
export default function mountComponent(props) { return `component = mount( <MemoryRouter> <Component ${props} /> </MemoryRouter> );`; }