1+ import React from 'react' ;
2+ import '@testing-library/dom' ;
3+ import '@testing-library/jest-dom' ;
4+ import { render } from '@testing-library/react' ;
5+ import { initialize , LDContext , LDFlagChangeset , LDOptions } from 'launchdarkly-js-client-sdk' ;
6+ import { AsyncProviderConfig , LDReactOptions } from './types' ;
7+ import { Consumer } from './context' ;
8+ import asyncWithLDProvider from './asyncWithLDProvider' ;
9+ import wrapperOptions from './wrapperOptions' ;
10+ import { fetchFlags } from './utils' ;
11+
12+
113jest . mock ( 'launchdarkly-js-client-sdk' , ( ) => {
214 const actual = jest . requireActual ( 'launchdarkly-js-client-sdk' ) ;
315
@@ -15,15 +27,6 @@ jest.mock('./utils', () => {
1527 } ;
1628} ) ;
1729
18- import React from 'react' ;
19- import { render } from '@testing-library/react' ;
20- import { initialize , LDContext , LDFlagChangeset , LDOptions } from 'launchdarkly-js-client-sdk' ;
21- import { AsyncProviderConfig , LDReactOptions } from './types' ;
22- import { Consumer } from './context' ;
23- import asyncWithLDProvider from './asyncWithLDProvider' ;
24- import wrapperOptions from './wrapperOptions' ;
25- import { fetchFlags } from './utils' ;
26-
2730const clientSideID = 'test-client-side-id' ;
2831const context : LDContext = { key : 'yus' , kind : 'user' , name : 'yus ng' } ;
2932const rawFlags = { 'test-flag' : true , 'another-test-flag' : true } ;
0 commit comments