Migrate some tests to React Testing Library (#9584)
This commit is contained in:
parent
ef548a4843
commit
38dbe8ed33
12 changed files with 325 additions and 527 deletions
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
// eslint-disable-next-line deprecate/import
|
||||
import { mount } from "enzyme";
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import * as TestUtils from "../../../test-utils";
|
||||
import FontScalingPanel from '../../../../src/components/views/settings/FontScalingPanel';
|
||||
|
@ -34,9 +33,9 @@ jest.mock(
|
|||
describe('FontScalingPanel', () => {
|
||||
it('renders the font scaling UI', () => {
|
||||
TestUtils.stubClient();
|
||||
const wrapper = mount(
|
||||
const { asFragment } = render(
|
||||
<FontScalingPanel />,
|
||||
);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue