Skip to content
Snippets Groups Projects
Select Git revision
  • 10f01d6b47c45d0787df69c7d6cb82a963987987
  • main default protected
  • 24-everything-from-git
  • 45-create-new-poc-deployment-with-docker
  • 44-add-a-cli-tool
  • improve-deployment
  • 31-backend
  • bash-script-bug-fix
  • upgrades_submodules
  • 24-dependencies-build-nested-watch
  • 24-dependencies-build-using-workspaces
  • 24-dependencies-build
  • wip-all-local
  • 10-annotot
  • 3-annotation-plugin-showing-up
15 results

index.js

Blame
  • WindowIcon.test.js 770 B
    import React from 'react';
    import { shallow } from 'enzyme';
    import WindowIcon from '../../../src/components/WindowIcon';
    
    /** createWrapper */
    function createWrapper(props) {
      return shallow(
        <WindowIcon
          manifestLogo=""
          classses={{}}
          {...props}
        />,
      ).dive(); // to unwrap HOC created by withStyles();
    }
    
    describe('WindowIcon', () => {
      it('should render nothing if no manifest logo given', () => {
        const wrapper = createWrapper();
        expect(wrapper.find('img').length).toBe(0);
      });
    
      it('should render logo if manifest logo is given', () => {
        const manifestLogo = 'http://foo.bar';
        const wrapper = createWrapper({ manifestLogo });
        expect(wrapper.find('img').first().prop('src'))
          .toEqual(manifestLogo);
      });
    });