Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import chai, {expect} from 'chai';
  2. import Select from './Select';
  3. import React, {createElement} from 'react';
  4. import {describeWithDOM, mount} from 'enzyme';
  5.  
  6. describe('UI Select', () => {
  7.  
  8. //more shallow tests here
  9.  
  10. describeWithDOM('User Actions', () => {
  11. it('Toggles the .ui-options menu on button click', () => {
  12. const wrapper = mount(<Select {...baseProps} />);
  13. expect(wrapper.state().open).to.not.be.ok;
  14. wrapper.find('button').simulate('click');
  15. expect(wrapper.state().open).to.be.ok;
  16. });
  17. });
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement