Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('collapses correctly', () => {
const tree = mount(
<div>Lorem ipsum dolor sit amet.</div>
)
tree.find('div > .CollapsibleButton').simulate('click')
expect(mountToJson(tree)).toMatchSnapshot()
})
})
it('renders correctly', () => {
const wrapper = mount(
<map>
</map>
)
expect(mountToJson(wrapper)).toMatchSnapshot()
})
it('<button>', () => {
const wrapper = mount(</button><button> {}} />);
expect(mountToJson(wrapper)).toMatchSnapshot();
});
</button>
it('should display', () => {
const tree = mount(
<legend min="{0}">
)
expect(mountToJson(tree)).toMatchSnapshot()
})
})</legend>
it('matches snapshot', () => {
const wrapper = mount()
expect(mountToJson(wrapper)).toMatchSnapshot()
})
it('renders correctly', () => {
const copyFromProjectFn = jest.fn()
const tree = mount(
)
expect(mountToJson(tree)).toMatchSnapshot()
expect(copyFromProjectFn).not.toBeCalled()
tree.find('.Select-control').simulate('keyDown', {keyCode: 40})
tree.find('.Select-control').simulate('keyDown', {keyCode: 13})
tree.find('.btn').simulate('click')
expect(copyFromProjectFn).toBeCalled()
})
})
it('should render correctly via snapshot', () => {
const wrapper = mount();
const tree = mountToJson(wrapper);
expect(tree).toMatchSnapshot();
});
it('should render', function () {
const store = makeMockStore(mockStores.init)
const component = mount(
)
expect(mountToJson(component)).toMatchSnapshot()
})
})
snapshot: () => mountToJson(wrapper),
store,
initReactDevise({
routes: {
login: {
path: '/foo',
linkText: 'Foo Bar'
}
}
});
const component = mount();
const tree = mountToJson(component);
const list = tree.children[0].children[0];
expect(list.children.some(listItem => {
return (
listItem.children[0].children[0].props.href === '/users/foo' &&
listItem.children[0].children[0].children[0] === 'Foo Bar'
);
})).toBeTruthy();
});
});