UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

24 lines (21 loc) 792 B
import React from 'react'; import { NJCard as FluidLib } from '../../../../lib/index'; import { NJCard as Source } from '../../../../src/components/card/NJCard'; import { render } from '@testing-library/react'; describe.each([ { Tag: Source, description: 'sources' }, { Tag: FluidLib, description: 'global library' } ])('using $description', ({ Tag }) => { it('renders correctly', () => { const { asFragment } = render(<Tag hasBottomBorder="true" isHorizontal="true" />); expect(asFragment()).toMatchSnapshot(); }); it('render all props', () => { const { asFragment } = render( <Tag className="classTest" hasBottomBorder="true" isHorizontal="true"> <div>un test de children</div> </Tag> ); expect(asFragment()).toMatchSnapshot(); }); });