Infer redux types when possible

This commit is contained in:
Alejandro Celaya
2025-11-14 14:21:14 +01:00
parent 145765e3fa
commit ae7aea0e2c
11 changed files with 18 additions and 38 deletions

View File

@@ -3,7 +3,7 @@ import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import type { PropsWithChildren, ReactElement } from 'react';
import { Provider } from 'react-redux';
import type { ShlinkState } from '../../src/container/types';
import type { RootState } from '../../src/store';
import { setUpStore } from '../../src/store';
export const renderWithEvents = (element: ReactElement, options?: RenderOptions) => ({
@@ -12,7 +12,7 @@ export const renderWithEvents = (element: ReactElement, options?: RenderOptions)
});
export type RenderOptionsWithState = Omit<RenderOptions, 'wrapper'> & {
initialState?: Partial<ShlinkState>;
initialState?: Partial<RootState>;
};
export const renderWithStore = (