@@ -11,9 +11,9 @@ const getTargets = _getTargets.default || _getTargets;
1111
1212const dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
1313
14- // "minNodeVersion": "23 .0.0" <-- For Ctrl+F when dropping node 22
15- const nodeGte23 = itGte ( "23.0 .0" ) ;
16- const nodeLt23 = itLt ( "23.0 .0" ) ;
14+ // "minNodeVersion": "22 .0.0" <-- For Ctrl+F when dropping node 20
15+ const nodeGte22_12 = itGte ( "22.12 .0" ) ;
16+ const nodeLt22_12 = itLt ( "22.12 .0" ) ;
1717
1818import { isMJS , loadOptionsAsync , skipUnsupportedESM } from "./helpers/esm.js" ;
1919
@@ -1169,20 +1169,23 @@ describe("buildConfigChain", function () {
11691169 } ,
11701170 ) ;
11711171
1172- nodeLt23 ( "should not load babel.config.mjs synchronously" , async ( ) => {
1173- const { cwd, tmp, config } = await getTemp (
1174- "babel-test-load-config-sync-babel.config.mjs" ,
1175- ) ;
1176- const filename = tmp ( "src.js" ) ;
1172+ nodeLt22_12 (
1173+ "should not load babel.config.mjs synchronously" ,
1174+ async ( ) => {
1175+ const { cwd, tmp, config } = await getTemp (
1176+ "babel-test-load-config-sync-babel.config.mjs" ,
1177+ ) ;
1178+ const filename = tmp ( "src.js" ) ;
11771179
1178- await config ( "babel.config.mjs" ) ;
1180+ await config ( "babel.config.mjs" ) ;
11791181
1180- expect ( ( ) => loadOptionsSync ( { filename, cwd } ) ) . toThrow (
1181- / i s o n l y s u p p o r t e d w h e n r u n n i n g B a b e l a s y n c h r o n o u s l y / ,
1182- ) ;
1183- } ) ;
1182+ expect ( ( ) => loadOptionsSync ( { filename, cwd } ) ) . toThrow (
1183+ / i s o n l y s u p p o r t e d w h e n r u n n i n g B a b e l a s y n c h r o n o u s l y / ,
1184+ ) ;
1185+ } ,
1186+ ) ;
11841187
1185- nodeGte23 ( "should load babel.config.mjs synchronously" , async ( ) => {
1188+ nodeGte22_12 ( "should load babel.config.mjs synchronously" , async ( ) => {
11861189 const { cwd, tmp, config } = await getTemp (
11871190 "babel-test-load-config-sync-babel.config.mjs" ,
11881191 ) ;
@@ -1282,7 +1285,7 @@ describe("buildConfigChain", function () {
12821285 } ) ;
12831286 } ) ;
12841287
1285- nodeLt23 ( "should not load .babelrc.mjs synchronously" , async ( ) => {
1288+ nodeLt22_12 ( "should not load .babelrc.mjs synchronously" , async ( ) => {
12861289 const { cwd, tmp, config } = await getTemp (
12871290 "babel-test-load-config-sync-.babelrc.mjs" ,
12881291 ) ;
@@ -1295,7 +1298,7 @@ describe("buildConfigChain", function () {
12951298 ) ;
12961299 } ) ;
12971300
1298- nodeGte23 ( "should load .babelrc.mjs synchronously" , async ( ) => {
1301+ nodeGte22_12 ( "should load .babelrc.mjs synchronously" , async ( ) => {
12991302 const { cwd, tmp, config } = await getTemp (
13001303 "babel-test-load-config-sync-.babelrc.mjs" ,
13011304 ) ;
0 commit comments