Skip to content

Commit

Permalink
chore: migrate tests to RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
theinfiltrator7 committed Oct 4, 2023
1 parent 777e5eb commit 4518653
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/__tests__/PopoverBody.spec.js
@@ -1,12 +1,9 @@
import React from 'react';
import { shallow } from 'enzyme';
import { testForChildrenInComponent } from '../testUtils';
import { PopoverBody } from '..';

describe('PopoverBody', () => {
it('should render children', () => {
const wrapper = shallow(<PopoverBody>Ello world</PopoverBody>);

expect(wrapper.text()).toBe('Ello world');
expect(wrapper.hasClass('popover-body')).toBe(true);
testForChildrenInComponent(PopoverBody);
});
});
7 changes: 2 additions & 5 deletions src/__tests__/PopoverHeader.spec.js
@@ -1,12 +1,9 @@
import React from 'react';
import { shallow } from 'enzyme';
import { testForChildrenInComponent } from '../testUtils';
import { PopoverHeader } from '..';

describe('PopoverHeader', () => {
it('should render children', () => {
const wrapper = shallow(<PopoverHeader>Ello world</PopoverHeader>);

expect(wrapper.text()).toBe('Ello world');
expect(wrapper.hasClass('popover-header')).toBe(true);
testForChildrenInComponent(PopoverHeader);
});
});

0 comments on commit 4518653

Please sign in to comment.