dareway-rui
Version:
39 lines (38 loc) • 1.09 kB
JavaScript
// import React from 'react';
// import { shallow } from 'enzyme';
//
// import View from './View';
//
// describe('ButtonView', () => {
// it('onClick works', () => {});
//
// // it('onClick works', () => {
// // const props = {
// // disabled: false,
// // value: '按钮',
// // onClick: jest.fn() // mock
// // };
// //
// // const wrapper = shallow(<View {...props} />);
// //
// // wrapper.find('button').simulate('click');
// //
// // expect(props.onClick).toBeCalled();
// // });
// //
// // it('disabled onClick should not works', () => {
// // const props = {
// // disabled: true,
// // value: '按钮',
// // onClick: jest.fn() // mock
// // };
// //
// // const wrapper = shallow(<View {...props} />);
// //
// // wrapper.find('button').simulate('click');
// //
// // expect(props.onClick).not.toBeCalled();
// // });
// });
;
//@ sourceMappingURL=View.test.js.map