Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const renderProxy = options => {
fixture = options.fixture;
onFixtureUpdate = jest.fn();
jest.resetAllMocks();
jest.useFakeTimers();
ReactComponentTree.__setStateMock(options.initialState);
StateProxy = createStateProxy({
updateInterval: 1337,
});
wrapper = shallow(
{}}
fixture={fixture}
onComponentRef={onComponentRef}
onFixtureUpdate={onFixtureUpdate}
disableLocalState={options.disabled}
/>,
);
childWrapper = wrapper.at(0);
childProps = childWrapper.props();