import * as React from 'react'; import * as renderer from 'react-test-renderer'; import { ServiceContainerProvider } from '../ServiceContainerProvider'; import { withServiceContainer } from '../withServiceContainer'; it('Connect to service container', (done) => { const mockConsumer = jest.fn(); mockConsumer.mockReturnValue(
Dummy
); const Component = withServiceContainer(({ serviceContainer }: { serviceContainer: { hi: string } }) => { expect(serviceContainer.hi).toBe('john'); done(); return
; }); renderer.create(( )); });