Skip to content
Snippets Groups Projects
StyledCard.spec.tsx 831 B
Newer Older
  • Learn to ignore specific revisions
  • import { FluidType } from 'enums'
    
    import { mount } from 'enzyme'
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
    import React from 'react'
    
    import StyledCard from './StyledCard'
    
    describe('StyledCard component test', () => {
    
      it('should render correctly Electricity StyledCard', () => {
    
        const wrapper = mount(
          <StyledCard fluidType={FluidType.ELECTRICITY}>children</StyledCard>
        )
    
        expect(wrapper.getElement()).toMatchSnapshot()
      })
    
      it('should render correctly Water StyledCard', () => {
    
        const wrapper = mount(
          <StyledCard fluidType={FluidType.WATER}>children</StyledCard>
        )
    
        expect(wrapper.getElement()).toMatchSnapshot()
      })
    
      it('should render correctly Gas StyledCard', () => {
    
        const wrapper = mount(
          <StyledCard fluidType={FluidType.GAS}>children</StyledCard>
        )
    
        expect(wrapper.getElement()).toMatchSnapshot()
      })
    })