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