Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import chai, {expect} from 'chai';
- import Select from './Select';
- import React, {createElement} from 'react';
- import {describeWithDOM, mount} from 'enzyme';
- describe('UI Select', () => {
- //more shallow tests here
- describeWithDOM('User Actions', () => {
- it('Toggles the .ui-options menu on button click', () => {
- const wrapper = mount(<Select {...baseProps} />);
- expect(wrapper.state().open).to.not.be.ok;
- wrapper.find('button').simulate('click');
- expect(wrapper.state().open).to.be.ok;
- });
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement