Last active
March 10, 2016 06:50
-
-
Save mistadikay/0e121e1a26b47d36939b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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