mars-v2-frontend/jest.setup.js
Yusuf Seyrek 999d936f85
feat: react helmet implementation (#223)
* feat: dynamic page metadata implementation

* cleanup: unused imports

* cleanup: more unused imports
2023-05-24 16:05:19 +03:00

20 lines
434 B
JavaScript

import '@testing-library/jest-dom/extend-expect'
jest.mock('react-helmet', () => {
const React = require('react')
const plugin = jest.requireActual('react-helmet')
const mockHelmet = ({ children, ...props }) =>
React.createElement(
'div',
{
...props,
className: 'mock-helmet',
},
children,
)
return {
...plugin,
Helmet: jest.fn().mockImplementation(mockHelmet),
}
})