diff --git a/src/__tests__/sanity-check.test.tsx b/src/__tests__/sanity-check.test.tsx
index 1e0ffb0..443fc8a 100644
--- a/src/__tests__/sanity-check.test.tsx
+++ b/src/__tests__/sanity-check.test.tsx
@@ -2,5 +2,5 @@ import { render, screen } from '@testing-library/react';
test('hello', () => {
render(
hello
);
- expect(screen.getByText('hello') as any).toBeInTheDocument();
+ expect(screen.getByText('hello')).toBeInTheDocument();
});
diff --git a/src/test-utils/setup-jest.ts b/src/test-utils/setup-jest.ts
index 6872c76..a604363 100644
--- a/src/test-utils/setup-jest.ts
+++ b/src/test-utils/setup-jest.ts
@@ -3,10 +3,11 @@ import '@testing-library/jest-dom';
// FIXME: Use something like jsdom-worker?
// see: https://github.com/developit/jsdom-worker
if (!global.Worker) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).Worker = class MockWorker {
events: Record void> = Object.create(null);
- onmessage?: () => {};
+ onmessage = undefined;
addEventListener(name: string, e: unknown) {
if (Object.hasOwn(this.events, name)) {
this.events[name](e);
diff --git a/src/test-utils/test-helper.tsx b/src/test-utils/test-helper.tsx
index 9968a97..7764c65 100644
--- a/src/test-utils/test-helper.tsx
+++ b/src/test-utils/test-helper.tsx
@@ -6,6 +6,7 @@ import { AppStore, RootState, setupStore } from '~/store';
// Adapted from: https://redux.js.org/usage/writing-tests
+// eslint-disable-next-line react-refresh/only-export-components
export * from '@testing-library/react';
export interface ExtendedRenderOptions extends RenderOptions {
@@ -17,7 +18,7 @@ export function renderWithProviders(
ui: React.ReactElement,
{ preloadedState = {}, store = setupStore(preloadedState), ...renderOptions }: ExtendedRenderOptions = {}
) {
- function Wrapper({ children }: PropsWithChildren<{}>): JSX.Element {
+ function Wrapper({ children }: PropsWithChildren): JSX.Element {
return {children};
}