Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should render with isRequired props', () => {
const saving = shallow(
{
// eslint-disable-next-line no-console
console.log("Saving...");
}}/>);
expect(shallowToJson(saving)).toMatchSnapshot();
});
});
it('should render with custom views', () => {
initReactDevise({
...auth,
routes: {
login: {
path: '/foo',
component: MyLogin
}
}
});
const component = shallow();
expect(component.find(Route)).toHaveLength(6);
const tree = shallowToJson(component);
expect(tree.children.some(n => n.props.path === '/users/foo')).toBeTruthy();
// TODO: This does not test that custom view component is being used.
// expect(component.find('div.my-login')).toHaveLength(1);
});
});
it('should render', () => {
const component = shallow( {}} submitButtonText='TEXT' />)
const tree = shallowToJson(component)
expect(tree).toMatchSnapshot()
});