@@ -4,7 +4,15 @@ import * as mockHelpers from './__helpers__/fixtures';
44jest . mock ( './log' ) ;
55
66describe ( 'appDelegateLinker' , ( ) => {
7- it ( 'should work for RN 0.77 with Objective-C' , ( ) => {
7+ it ( 'should work for RN 0.77 & 0.78 with Objective-C' , ( ) => {
8+ const { getReactNativeVersion } = require ( './__helpers__/reactNativeVersion' ) ;
9+ const rnVersion = getReactNativeVersion ( ) ;
10+
11+ if ( rnVersion && rnVersion . minor >= 79 ) {
12+ console . log ( `Skipping RN 0.77 test (current version: ${ rnVersion . raw } )` ) ;
13+ return ;
14+ }
15+
816 jest . mock ( './path' , ( ) => {
917 const appDelegatePath = mockHelpers . prepareFixtureDuplicate77 ( {
1018 userFixtureFileName : 'AppDelegate.mm.template' ,
@@ -23,7 +31,15 @@ describe('appDelegateLinker', () => {
2331 expect ( appDelegateContent ) . toMatchSnapshot ( ) ;
2432 } ) ;
2533
26- it ( 'should work for RN 0.77 with Swift' , ( ) => {
34+ it ( 'should work for RN 0.77 & 0.78 with Swift' , ( ) => {
35+ const { getReactNativeVersion } = require ( './__helpers__/reactNativeVersion' ) ;
36+ const rnVersion = getReactNativeVersion ( ) ;
37+
38+ if ( rnVersion && rnVersion . minor >= 79 ) {
39+ console . log ( `Skipping RN 0.77 test (current version: ${ rnVersion . raw } )` ) ;
40+ return ;
41+ }
42+
2743 jest . mock ( './path' , ( ) => {
2844 const tmpAppDelegatePath = mockHelpers . prepareFixtureDuplicate77 ( {
2945 userFixtureFileName : 'AppDelegate.swift.template' ,
@@ -43,7 +59,15 @@ describe('appDelegateLinker', () => {
4359 expect ( appDelegateContent ) . toMatchSnapshot ( ) ;
4460 } ) ;
4561
46- it ( 'should work with Swift bridgeless RN 0.79+' , ( ) => {
62+ it ( 'should work with Swift bridgeless RN 0.79' , ( ) => {
63+ const { getReactNativeVersion } = require ( './__helpers__/reactNativeVersion' ) ;
64+ const rnVersion = getReactNativeVersion ( ) ;
65+
66+ if ( ! rnVersion || rnVersion . minor < 79 ) {
67+ console . log ( `Skipping RN 0.79 test (current version: ${ rnVersion ?. raw || 'unknown' } )` ) ;
68+ return ;
69+ }
70+
4771 jest . mock ( './path' , ( ) => {
4872 const tmpAppDelegatePath = mockHelpers . prepareFixtureDuplicate79 ( {
4973 userFixtureFileName : 'AppDelegate.swift.template' ,
0 commit comments