闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
441 B

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);
});
});