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
+
1
13
jest . mock ( 'launchdarkly-js-client-sdk' , ( ) => {
2
14
const actual = jest . requireActual ( 'launchdarkly-js-client-sdk' ) ;
3
15
@@ -15,15 +27,6 @@ jest.mock('./utils', () => {
15
27
} ;
16
28
} ) ;
17
29
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
-
27
30
const clientSideID = 'test-client-side-id' ;
28
31
const context : LDContext = { key : 'yus' , kind : 'user' , name : 'yus ng' } ;
29
32
const rawFlags = { 'test-flag' : true , 'another-test-flag' : true } ;
0 commit comments