Created
January 25, 2019 15:42
-
-
Save ahuggins/ba3ac0a8b377eb97ff85802d72891d86 to your computer and use it in GitHub Desktop.
Use .hostNodes() to see only DOM output
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 React from 'react'; | |
| import { render, mount, shallow } from 'enzyme'; | |
| import { Foo } from 'Foo'; | |
| describe.only('Test for Foo component', function () { | |
| it('can mount Foo component', function () { | |
| const wrap = mount( | |
| <Foo /> | |
| ); | |
| console.log(wrap.find('.someCustomClass').hostNodes().debug()); | |
| expect(wrap.find('.someCustomClass').hostNodes()).to.have.length(1); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment