Skip to content

Commit 1b0400f

Browse files
committed
chore(tests-ErrorBoundary): remove redundant type assertion
1 parent abf8fa8 commit 1b0400f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/ErrorBoundary/ErrorBoundary.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render } from '@testing-library/react';
2-
import React, { ComponentType } from 'react';
2+
import React from 'react';
33
import { create } from 'react-test-renderer';
44
import ErrorBoundary from './ErrorBoundary';
55

@@ -13,7 +13,7 @@ const ComponentWithError = ({ shouldThrow }: { shouldThrow?: boolean }) => {
1313
};
1414

1515
describe('ErrorBoundary', () => {
16-
const OLD_ENV = process.env;
16+
const OLD_ENV = { ...process.env };
1717
let mockConsoleError: jest.SpyInstance;
1818

1919
beforeEach(() => {
@@ -48,7 +48,7 @@ describe('ErrorBoundary', () => {
4848

4949
test('should render alert message when error happened', () => {
5050
const { queryByRole, rerender } = render(<ComponentWithError />, {
51-
wrapper: ErrorBoundary as ComponentType<unknown>,
51+
wrapper: ErrorBoundary,
5252
});
5353

5454
expect(queryByRole('alert')).not.toBeInTheDocument();

0 commit comments

Comments
 (0)