1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-13 09:44:30 +07:00
verdaccio-ui/src/utils/test-react-testing-library.tsx

19 lines
537 B
TypeScript

import { render } from '@testing-library/react';
import React from 'react';
import { I18nextProvider } from 'react-i18next';
import i18nConfig from '../../i18n/config';
import ThemeProvider from '../design-tokens/ThemeProvider';
const customRender = (node: React.ReactElement<any>, ...options: Array<any>) => {
return render(
<ThemeProvider>
<I18nextProvider i18n={i18nConfig}>{node}</I18nextProvider>
</ThemeProvider>,
...options
);
};
export * from '@testing-library/react';
export { customRender as render };