diff --git a/packages/react/src/components/Label/Label.test.tsx b/packages/react/src/components/Label/Label.test.tsx index a7a8543cd6673..353ef2479cc30 100644 --- a/packages/react/src/components/Label/Label.test.tsx +++ b/packages/react/src/components/Label/Label.test.tsx @@ -1,19 +1,18 @@ import * as React from 'react'; -import { mount } from 'enzyme'; -import * as renderer from 'react-test-renderer'; +import { render } from '@testing-library/react'; import { isConformant } from '../../common/isConformant'; import { Label } from './Label'; describe('Label', () => { it('renders a label', () => { - const label = mount(); - expect(label.text()).toEqual('test'); + const { container } = render(); + const label = container.querySelector('label'); + expect(label!.textContent).toEqual('test'); }); it('renders label correctly', () => { - const component = renderer.create(); - const tree = component.toJSON(); - expect(tree).toMatchSnapshot(); + const { container } = render(); + expect(container).toMatchSnapshot(); }); isConformant({ diff --git a/packages/react/src/components/Label/__snapshots__/Label.test.tsx.snap b/packages/react/src/components/Label/__snapshots__/Label.test.tsx.snap index 5fa9f1c120f59..d61961a01f820 100644 --- a/packages/react/src/components/Label/__snapshots__/Label.test.tsx.snap +++ b/packages/react/src/components/Label/__snapshots__/Label.test.tsx.snap @@ -1,31 +1,33 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Label renders label correctly 1`] = ` - +