Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import React from 'react';
import { shallow } from 'enzyme';
import Footer from '../Footer';

describe('Footer', () => {
  it('matches a snapshot', () => {
    const primaryLinks = [
      { label: { id: 'test1', defaultMessage: 'Test1' }, to: 'https://www.doodle.com' },
      { label: { id: 'test2', defaultMessage: 'Test2' }, to: 'https://www.doodle.com/create' },
    ];
    const secondaryLinks = [
      { label: { id: 'test3', defaultMessage: 'Test3' }, to: 'https://www.doodle.com' },
      { label: { id: 'test4', defaultMessage: 'Test4' }, to: 'https://www.doodle.com/create' },
    ];
    const component = shallow(
      <Footer
        className="Test"
        primaryLinks={primaryLinks}
        secondaryLinks={secondaryLinks}
        languageMenu={null}
        page="test"
      />
    );

    expect(component.getElement()).toMatchSnapshot();
  });

  it('should concatenate the passed className onto final className string', () => {
    const className = 'Test';
    const component = shallow(<Footer className={className} page="test" />);

    expect(component.childAt(0).props().className).toEqual(expect.stringContaining('Test'));
    expect(component.childAt(1).props().className).toEqual(expect.stringContaining('Test'));
  });
});