Skip to content
Snippets Groups Projects
CGUModal.spec.tsx 526 B
Newer Older
  • Learn to ignore specific revisions
  • Guilhem CARRON's avatar
    Guilhem CARRON committed
    import React from 'react'
    import { mount } from 'enzyme'
    
    import CGUModal from './CGUModal'
    
    import toJson from 'enzyme-to-json'
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    
    jest.mock('cozy-ui/transpiled/react/I18n', () => {
      return {
        useI18n: jest.fn(() => {
          return {
            t: (str: string) => str,
          }
        }),
      }
    })
    
    
    describe('CGUModal component', () => {
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
      it('should be rendered correctly', () => {
    
        const component = mount(
          <CGUModal open={true} handleCloseClick={jest.fn()} />
    
        )
        expect(toJson(component)).toMatchSnapshot()
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
      })
    })