@@ -14,6 +14,9 @@ describe("isBridgelessEnabled()", () => {
1414 // Bridgeless mode is enabled by default starting with 0.74
1515 const defaultVersion = v ( 0 , 74 , 0 ) ;
1616
17+ // Bridgeless mode is always enabled starting with 0.82
18+ const exclusiveVersion = v ( 0 , 82 , 0 ) ;
19+
1720 before ( ( ) => {
1821 delete process . env [ "RCT_NEW_ARCH_ENABLED" ] ;
1922 } ) ;
@@ -43,6 +46,18 @@ describe("isBridgelessEnabled()", () => {
4346 ) ;
4447 } ) ;
4548
49+ it ( "always returns true starting with 0.82" , ( ) => {
50+ ok ( isBridgelessEnabled ( exclusiveVersion , { } ) ) ;
51+ ok ( isBridgelessEnabled ( exclusiveVersion , { fabricEnabled : false } ) ) ;
52+ ok ( isBridgelessEnabled ( exclusiveVersion , { fabricEnabled : true } ) ) ;
53+ ok (
54+ isBridgelessEnabled ( exclusiveVersion , {
55+ fabricEnabled : true ,
56+ bridgelessEnabled : false ,
57+ } )
58+ ) ;
59+ } ) ;
60+
4661 it ( "does not return true just because `RCT_NEW_ARCH_ENABLED` is set" , ( ) => {
4762 // `RCT_NEW_ARCH_ENABLED` does not enable bridgeless on older versions
4863 process . env [ "RCT_NEW_ARCH_ENABLED" ] = "1" ;
@@ -108,6 +123,9 @@ describe("isNewArchEnabled()", () => {
108123 // New architecture is first publicly available in 0.68, but we'll require 0.71
109124 const firstAvailableVersion = v ( 0 , 71 , 0 ) ;
110125
126+ // New architecture is always enabled starting with 0.82
127+ const exclusiveVersion = v ( 0 , 82 , 0 ) ;
128+
111129 before ( ( ) => {
112130 delete process . env [ "RCT_NEW_ARCH_ENABLED" ] ;
113131 } ) ;
@@ -140,4 +158,10 @@ describe("isNewArchEnabled()", () => {
140158 ok ( ! isNewArchEnabled ( firstAvailableVersion , { } ) ) ;
141159 ok ( ! isNewArchEnabled ( firstAvailableVersion , { fabric_enabled : true } ) ) ;
142160 } ) ;
161+
162+ it ( "always returns true starting with 0.82" , ( ) => {
163+ ok ( isNewArchEnabled ( exclusiveVersion , { } ) ) ;
164+ ok ( isNewArchEnabled ( exclusiveVersion , { fabricEnabled : false } ) ) ;
165+ ok ( isNewArchEnabled ( exclusiveVersion , { newArchEnabled : false } ) ) ;
166+ } ) ;
143167} ) ;
0 commit comments