mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 11:29:12 +00:00
11 lines
305 B
TypeScript
11 lines
305 B
TypeScript
import { shallow } from 'enzyme';
|
|
import * as React from 'react';
|
|
import { Button } from './Button';
|
|
|
|
it('fires an onClick callback when clicked', () => {
|
|
const mock = jest.fn();
|
|
const view = shallow(<Button onClick={mock}>Button</Button>);
|
|
|
|
view.simulate('click');
|
|
expect(mock).toBeCalled();
|
|
});
|