@@ -55,31 +55,39 @@ describe("isBridgelessEnabled()", () => {
5555} ) ;
5656
5757describe ( "isHermesEnabled()" , ( ) => {
58- before ( ( ) => {
58+ function resetEnvironmentVariables ( ) {
5959 delete process . env [ "USE_HERMES" ] ;
60- } ) ;
60+ }
6161
62- afterEach ( ( ) => {
63- delete process . env [ "USE_HERMES" ] ;
64- } ) ;
62+ before ( resetEnvironmentVariables ) ;
63+
64+ afterEach ( resetEnvironmentVariables ) ;
6565
6666 for ( const platform of [ "ios" , "macos" , "visionos" ] as const ) {
6767 it ( `[${ platform } ] is disabled by default` , ( ) => {
68- ok ( ! isHermesEnabled ( platform , v ( 1 , 0 , 0 ) , { } ) ) ;
68+ ok ( ! isHermesEnabled ( platform , v ( 0 , 79 , 0 ) , { } ) ) ;
6969 } ) ;
7070
7171 it ( `[${ platform } ] returns true when enabled` , ( ) => {
72- ok ( isHermesEnabled ( platform , v ( 1 , 0 , 0 ) , { hermesEnabled : true } ) ) ;
72+ ok ( isHermesEnabled ( platform , v ( 0 , 79 , 0 ) , { hermesEnabled : true } ) ) ;
7373 } ) ;
7474
7575 it ( `[${ platform } ] returns true if 'USE_HERMES=1'` , ( ) => {
7676 process . env [ "USE_HERMES" ] = "1" ;
77- ok ( isHermesEnabled ( platform , v ( 1 , 0 , 0 ) , { } ) ) ;
77+ ok ( isHermesEnabled ( platform , v ( 0 , 79 , 0 ) , { } ) ) ;
7878 } ) ;
7979
8080 it ( `[${ platform } ] returns false if 'USE_HERMES=0'` , ( ) => {
8181 process . env [ "USE_HERMES" ] = "0" ;
82- ok ( ! isHermesEnabled ( platform , v ( 1 , 0 , 0 ) , { hermesEnabled : true } ) ) ;
82+ ok ( ! isHermesEnabled ( platform , v ( 0 , 79 , 0 ) , { hermesEnabled : true } ) ) ;
83+ } ) ;
84+
85+ it ( `[${ platform } ] always returns true from 0.80 on` , ( ) => {
86+ ok ( isHermesEnabled ( platform , v ( 0 , 80 , 0 ) , { } ) ) ;
87+
88+ process . env [ "USE_HERMES" ] = "0" ;
89+
90+ ok ( isHermesEnabled ( platform , v ( 0 , 80 , 0 ) , { } ) ) ;
8391 } ) ;
8492 }
8593
0 commit comments