@@ -17,6 +17,7 @@ import {
17
17
Locale ,
18
18
LogLevel ,
19
19
NetworkInterceptionMode ,
20
+ OverAirUpdateServices ,
20
21
ReproStepsMode ,
21
22
StringKey ,
22
23
WelcomeMessageMode ,
@@ -281,6 +282,10 @@ describe('Instabug Module', () => {
281
282
invocationEvents : [ InvocationEvent . floatingButton , InvocationEvent . shake ] ,
282
283
debugLogsLevel : LogLevel . debug ,
283
284
codePushVersion : '1.1.0' ,
285
+ overAirVersion : {
286
+ service : OverAirUpdateServices . expo ,
287
+ version : 'D0A12345-6789-4B3C-A123-4567ABCDEF01' ,
288
+ } ,
284
289
} ;
285
290
const usesNativeNetworkInterception = false ;
286
291
@@ -294,6 +299,7 @@ describe('Instabug Module', () => {
294
299
instabugConfig . debugLogsLevel ,
295
300
usesNativeNetworkInterception ,
296
301
instabugConfig . codePushVersion ,
302
+ instabugConfig . overAirVersion ,
297
303
) ;
298
304
} ) ;
299
305
@@ -306,13 +312,29 @@ describe('Instabug Module', () => {
306
312
expect ( NativeInstabug . setCodePushVersion ) . toBeCalledWith ( codePushVersion ) ;
307
313
} ) ;
308
314
315
+ it ( 'setOverAirVersion should call native method setOverAirVersion' , ( ) => {
316
+ const OTAversion = {
317
+ service : OverAirUpdateServices . expo ,
318
+ version : 'D0A12345-6789-4B3C-A123-4567ABCDEF01' ,
319
+ } ;
320
+
321
+ Instabug . setOverAirVersion ( OTAversion ) ;
322
+
323
+ expect ( NativeInstabug . setOverAirVersion ) . toBeCalledTimes ( 1 ) ;
324
+ expect ( NativeInstabug . setOverAirVersion ) . toBeCalledWith ( OTAversion ) ;
325
+ } ) ;
326
+
309
327
it ( 'init should disable JavaScript interceptor when using native interception mode' , ( ) => {
310
328
const instabugConfig = {
311
329
token : 'some-token' ,
312
330
invocationEvents : [ InvocationEvent . floatingButton , InvocationEvent . shake ] ,
313
331
debugLogsLevel : LogLevel . debug ,
314
332
networkInterceptionMode : NetworkInterceptionMode . native ,
315
333
codePushVersion : '1.1.0' ,
334
+ overAirVersion : {
335
+ service : OverAirUpdateServices . expo ,
336
+ version : 'D0A12345-6789-4B3C-A123-4567ABCDEF01' ,
337
+ } ,
316
338
} ;
317
339
318
340
Instabug . init ( instabugConfig ) ;
@@ -326,6 +348,7 @@ describe('Instabug Module', () => {
326
348
// usesNativeNetworkInterception should be true when using native interception mode
327
349
true ,
328
350
instabugConfig . codePushVersion ,
351
+ instabugConfig . overAirVersion ,
329
352
) ;
330
353
} ) ;
331
354
0 commit comments