Sha256: dbe0aa10158c98308d9de855ca4c355ea3d864e353c50582df9958c7438b5e01
Contents?: true
Size: 844 Bytes
Versions: 13
Compression:
Stored size: 844 Bytes
Contents
import React from 'react'; import { mount } from 'enzyme'; import toJson from 'enzyme-to-json'; import withOrganization from './withOrganization'; jest.mock('../SelectOrg/SetOrganization'); describe('subscriptions page', () => { const WrappedComponent = () => <div> Wrapped! </div>; it('should render the wrapped component', () => { global.document.getElementById = () => ({ dataset: { id: 1 } }); const Component = withOrganization(WrappedComponent, '/test'); const page = mount(<Component />); expect(toJson(page)).toMatchSnapshot(); }); it('should render select org page', () => { global.document.getElementById = () => ({ dataset: { id: '' } }); const Component = withOrganization(WrappedComponent, '/test'); const page = mount(<Component />); expect(toJson(page)).toMatchSnapshot(); }); });
Version data entries
13 entries across 13 versions & 1 rubygems