mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-23 05:52:42 -05:00
15 lines
579 B
JavaScript
15 lines
579 B
JavaScript
/* eslint-env jest */
|
|
import React from 'react'; // eslint-disable-line no-unused-vars
|
|
import {shallow} from 'enzyme';
|
|
import BrushModeComponent from '../../../src/components/brush-mode.jsx'; // eslint-disable-line no-unused-vars
|
|
|
|
describe('BrushModeComponent', () => {
|
|
test('triggers callback when clicked', () => {
|
|
const onClick = jest.fn();
|
|
const componentShallowWrapper = shallow(
|
|
<BrushModeComponent onMouseDown={onClick}/>
|
|
);
|
|
componentShallowWrapper.simulate('click');
|
|
expect(onClick).toHaveBeenCalled();
|
|
});
|
|
});
|