Skip to content

Instantly share code, notes, and snippets.

@ahuggins
Created January 25, 2019 15:28
Show Gist options
  • Select an option

  • Save ahuggins/3b4b573be9e8554c2bc48970e804becf to your computer and use it in GitHub Desktop.

Select an option

Save ahuggins/3b4b573be9e8554c2bc48970e804becf to your computer and use it in GitHub Desktop.
Debug className issue
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').debug());
expect(wrap.find('.someCustomClass')).to.have.length(1);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment