* use testing-libruaby for new tests * tests for auth module * add svg stub * add global stub for `useIntl` * add global stub for `common/settings`
11 lines
299 B
TypeScript
11 lines
299 B
TypeScript
jest.mock('react-intl', () => {
|
|
const messages = require('locales/en.json');
|
|
const reactIntl = jest.requireActual('react-intl');
|
|
const intlProvider = new reactIntl.IntlProvider({ locale: 'en', messages }, {});
|
|
|
|
return {
|
|
...reactIntl,
|
|
useIntl: () => intlProvider.state.intl,
|
|
};
|
|
});
|