Newer
Older
import toJson from 'enzyme-to-json'
import React from 'react'
import LegalNoticeModal from './LegalNoticeModal'
jest.mock('cozy-ui/transpiled/react/I18n', () => ({
useI18n: jest.fn(() => ({
t: (str: string) => str,
})),
}))
describe('LegalNoticeModal component', () => {
const component = mount(
<LegalNoticeModal open={true} handleCloseClick={jest.fn()} />
)
expect(toJson(component)).toMatchSnapshot()