Skip to content
Snippets Groups Projects
Select Git revision
  • ef9d58bd7c6a041f077d3500f92bb433de41ebbd
  • master default protected
2 results

buttonBar.test.js

Blame
  • buttonBar.test.js 561 B
    import React from 'react';
    import { render } from '@testing-library/react';
    
    import { Button, ButtonBar } from './buttonBar.js';
    
    describe('the Button component', () => {
      test('is an ordinary button with only an image and alt text', () => {
        const { container } = render(<Button image="abc" altText="def" />);
        expect(container).toMatchSnapshot();
      });
    });
    
    describe('the ButtonBar component', () => {
      test('is an ordinary div', () => {
        const { container } = render(<ButtonBar>abc</ButtonBar>);
        expect(container).toMatchSnapshot();
      });
    });