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