Skip to content

Instantly share code, notes, and snippets.

@mistadikay
Last active March 10, 2016 06:50
Show Gist options
  • Save mistadikay/0e121e1a26b47d36939b to your computer and use it in GitHub Desktop.
Save mistadikay/0e121e1a26b47d36939b to your computer and use it in GitHub Desktop.
import {
renderIntoDocument,
findRenderedDOMComponentWithBEM,
isDOMComponent
} from 'rebem-test-utils';
import Popup from '../components/popup';
const tree = renderIntoDocument(<Popup />);
const overlay = findRenderedDOMComponentWithBEM(tree, { block: 'popup', elem: 'overlay' });
console.log(
isDOMComponent(overlay)
);
// true
import { shallow } from 'rebem-enzyme';
import Popup from '../components/popup';
const wrapper = shallow(<Popup />);
console.log(
wrapper.findBEM({ block: 'popup', elem: 'content' }).length
);
// 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment