Repository URL to install this package:
|
Version:
4.1.3 ▾
|
import React from 'react';
import { shallow } from 'enzyme';
import LogoLink from '../LogoLink';
describe('LogoLink', () => {
let component;
const logoUrl = '/some/logo/link';
const companyWebsite = 'https://ecorp.com';
beforeEach(() => {
component = shallow(<LogoLink logoUrl={logoUrl} redirectUrl={companyWebsite} />);
});
describe('when logoUrl is provided', () => {
it('should match a snapshot', () => {
expect(component.getElement()).toMatchSnapshot();
});
});
describe('when logoUrl is not provided', () => {
beforeEach(() => {
component.setProps({
logoUrl: '',
});
});
it('should match a snapshot', () => {
expect(component.getElement()).toMatchSnapshot();
});
});
describe('when redirectUrl is not provided', () => {
beforeEach(() => {
component.setProps({
redirectUrl: '',
});
});
it('should match a snapshot', () => {
expect(component.getElement()).toMatchSnapshot();
});
});
});