|
@@ -8,17 +8,17 @@ describe('MetricsWrapper', () => {
|
|
|
const component = shallow(
|
|
|
<MetricsWrapper wrapperClassName={className} multiline />
|
|
|
);
|
|
|
- expect(component.find(`.${className}`).exists()).toBeTruthy();
|
|
|
- expect(component.find('.level-multiline').exists()).toBeTruthy();
|
|
|
+ expect(component.exists(`.${className}`)).toBeTruthy();
|
|
|
+ expect(component.exists('.level-multiline')).toBeTruthy();
|
|
|
});
|
|
|
|
|
|
it('correctly renders children', () => {
|
|
|
let component = shallow(<MetricsWrapper />);
|
|
|
- expect(component.find('.subtitle').exists()).toBeFalsy();
|
|
|
+ expect(component.exists('.subtitle')).toBeFalsy();
|
|
|
|
|
|
const title = 'title';
|
|
|
component = shallow(<MetricsWrapper title={title} />);
|
|
|
- expect(component.find('.subtitle').exists()).toBeTruthy();
|
|
|
+ expect(component.exists('.subtitle')).toBeTruthy();
|
|
|
expect(component.text()).toEqual(title);
|
|
|
});
|
|
|
});
|