File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Examples/CodePushDemoApp/__tests__ Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,29 @@ import App from '../App';
5
5
// Note: test renderer must be required after react-native.
6
6
import renderer from 'react-test-renderer' ;
7
7
8
+ jest . mock ( 'react-native-code-push' , ( ) => {
9
+ const cp = ( _ ) => ( app ) => app ;
10
+ Object . assign ( cp , {
11
+ InstallMode : { } ,
12
+ CheckFrequency : { } ,
13
+ SyncStatus : { } ,
14
+ UpdateState : { } ,
15
+ DeploymentStatus : { } ,
16
+ DEFAULT_UPDATE_DIALOG : { } ,
17
+
18
+ checkForUpdate : jest . fn ( ) ,
19
+ codePushify : jest . fn ( ) ,
20
+ getConfiguration : jest . fn ( ) ,
21
+ getCurrentPackage : jest . fn ( ) ,
22
+ getUpdateMetadata : jest . fn ( ) ,
23
+ log : jest . fn ( ) ,
24
+ notifyAppReady : jest . fn ( ) ,
25
+ notifyApplicationReady : jest . fn ( ) ,
26
+ sync : jest . fn ( ) ,
27
+ } ) ;
28
+ return cp ;
29
+ } ) ;
30
+
8
31
it ( 'renders correctly' , ( ) => {
9
32
const tree = renderer . create (
10
33
< App />
You can’t perform that action at this time.
0 commit comments