@@ -314,7 +314,10 @@ it(`should use hash from env even when "devEngines" defines a different one`, as
314314 } ) ;
315315} ) ;
316316
317- it ( `should use hash from env even when ".corepack.env" defines a different one` , async ( ) => {
317+ it ( `should use hash from env even when ".corepack.env" defines a different one` , async t => {
318+ // Skip rest of the test on Node.js 18.x as it lacks support for .env files.
319+ if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
320+
318321 await xfs . mktempPromise ( async cwd => {
319322 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as PortablePath ) , {
320323 devEngines : {
@@ -336,7 +339,10 @@ it(`should use hash from env even when ".corepack.env" defines a different one`,
336339} ) ;
337340
338341describe ( `should accept range in devEngines only if a specific version is provided` , ( ) => {
339- it ( `either in .corepack.env` , async ( ) => {
342+ it ( `either in .corepack.env` , async t => {
343+ // Skip rest of the test on Node.js 18.x as it lacks support for .env files.
344+ if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
345+
340346 await xfs . mktempPromise ( async cwd => {
341347 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as PortablePath ) , {
342348 devEngines : {
@@ -361,7 +367,10 @@ describe(`should accept range in devEngines only if a specific version is provid
361367 } ) ;
362368 } ) ;
363369 } ) ;
364- it ( `either in a different env file specified in env` , async ( ) => {
370+ it ( `either in a different env file specified in env` , async t => {
371+ // Skip rest of the test on Node.js 18.x as it lacks support for .env files.
372+ if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
373+
365374 await xfs . mktempPromise ( async cwd => {
366375 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as PortablePath ) , {
367376 devEngines : {
@@ -445,7 +454,10 @@ describe(`should accept range in devEngines only if a specific version is provid
445454 } ) ;
446455} ) ;
447456
448- it ( `Should use version from correct source` , async ( ) => {
457+ it ( `Should use version from correct source` , async t => {
458+ // Skip rest of the test on Node.js 18.x as it lacks support for .env files.
459+ if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
460+
449461 await xfs . mktempPromise ( async cwd => {
450462 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as PortablePath ) , {
451463 devEngines : {
@@ -484,7 +496,10 @@ it(`Should use version from correct source`, async () => {
484496} ) ;
485497
486498describe ( `should reject if range in devEngines does not match version provided` , ( ) => {
487- it ( `in .corepack.env` , async ( ) => {
499+ it ( `in .corepack.env` , async t => {
500+ // Skip rest of the test on Node.js 18.x as it lacks support for .env files.
501+ if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
502+
488503 await xfs . mktempPromise ( async cwd => {
489504 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as PortablePath ) , {
490505 devEngines : {
0 commit comments