mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
13 lines
440 B
TypeScript
13 lines
440 B
TypeScript
import { shallow } from 'enzyme';
|
|
import * as React from 'react';
|
|
import { roleCategory } from 'roleypoly/common/types/storyData';
|
|
import { Role } from './Role';
|
|
|
|
it('fires an OnClick handler when clicked', () => {
|
|
const onClickMock = jest.fn();
|
|
const view = shallow(
|
|
<Role role={roleCategory[0]} selected={true} onClick={onClickMock} />
|
|
);
|
|
view.simulate('click');
|
|
expect(onClickMock).toBeCalledWith(false);
|
|
});
|