1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-03 17:28:35 +09:00
YuruToot/spec/javascript/components/button.test.jsx
2016-10-10 22:48:58 +02:00

15 lines
441 B
JavaScript

import { expect } from 'chai';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import Button from '../../../app/assets/javascripts/components/components/button'
describe('<Button />', () => {
it('simulates click events', () => {
const onClick = sinon.spy();
const wrapper = shallow(<Button onClick={onClick} />);
wrapper.find('button').simulate('click');
expect(onClick.calledOnce).to.equal(true);
});
});