@@ -682,10 +682,7 @@ describe(`when called on a project without any defined packageManager`, () => {
682682 } ) ;
683683 } ) ;
684684
685- it ( `should modify package.json if enabled by .corepack.env` , async t => {
686- // Skip that test on Node.js 18.x as it lacks support for .env files.
687- if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
688-
685+ it ( `should modify package.json if enabled by .corepack.env` , async ( ) => {
689686 await xfs . mktempPromise ( async cwd => {
690687 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as Filename ) , {
691688 // empty package.json file
@@ -1007,7 +1004,10 @@ it(`should support hydrating package managers if cache folder was removed`, asyn
10071004 } ) ;
10081005} ) ;
10091006
1010- it ( `should support hydrating multiple package managers from cached archives` , async ( ) => {
1007+ it ( `should support hydrating multiple package managers from cached archives` , async t => {
1008+ // Skip that test on Windows as it times out
1009+ if ( process . platform === `win32` ) t . skip ( ) ;
1010+
10111011 await xfs . mktempPromise ( async cwd => {
10121012 await expect ( runCli ( cwd , [ `pack` , `yarn@2.2.2` , `pnpm@5.8.0` ] ) ) . resolves . toMatchObject ( {
10131013 exitCode : 0 ,
@@ -1343,10 +1343,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
13431343 } ) ;
13441344 } ) ;
13451345
1346- it ( `from .corepack.env file` , async t => {
1347- // Skip that test on Node.js 18.x as it lacks support for .env files.
1348- if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
1349-
1346+ it ( `from .corepack.env file` , async ( ) => {
13501347 await xfs . mktempPromise ( async cwd => {
13511348 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as Filename ) , {
13521349 } ) ;
@@ -1366,10 +1363,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
13661363 } ) ;
13671364 } ) ;
13681365
1369- it ( `from env file defined by COREPACK_ENV_FILE` , async t => {
1370- // Skip that test on Node.js 18.x as it lacks support for .env files.
1371- if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
1372-
1366+ it ( `from env file defined by COREPACK_ENV_FILE` , async ( ) => {
13731367 await xfs . mktempPromise ( async cwd => {
13741368 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as Filename ) , {
13751369 } ) ;
@@ -1416,10 +1410,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
14161410 } ) ;
14171411 } ) ;
14181412
1419- it ( `should ignore .corepack.env file if COREPACK_ENV_FILE is set to 0` , async t => {
1420- // Skip that test on Node.js 18.x as it lacks support for .env files.
1421- if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
1422-
1413+ it ( `should ignore .corepack.env file if COREPACK_ENV_FILE is set to 0` , async ( ) => {
14231414 await xfs . mktempPromise ( async cwd => {
14241415 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as Filename ) , {
14251416 } ) ;
@@ -1442,10 +1433,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
14421433 } ) ;
14431434 } ) ;
14441435
1445- it ( `from env file defined by COREPACK_ENV_FILE` , async t => {
1446- // Skip that test on Node.js 18.x as it lacks support for .env files.
1447- if ( process . version . startsWith ( `v18.` ) ) t . skip ( ) ;
1448-
1436+ it ( `from env file defined by COREPACK_ENV_FILE` , async ( ) => {
14491437 process . env . COREPACK_ENV_FILE = `.other.env` ;
14501438 await xfs . mktempPromise ( async cwd => {
14511439 await xfs . writeJsonPromise ( ppath . join ( cwd , `package.json` as Filename ) , {
@@ -1470,6 +1458,10 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
14701458for ( const authType of [ `COREPACK_NPM_REGISTRY` , `COREPACK_NPM_TOKEN` , `COREPACK_NPM_PASSWORD` , `PROXY` ] ) {
14711459 describe ( `custom registry with auth ${ authType } ` , ( ) => {
14721460 beforeEach ( ( ) => {
1461+ if ( authType === `PROXY` ) {
1462+ process . env . HTTP_PROXY = `http://localhost:23456` ; // Arbitrary port number that's hopefully free
1463+ process . env . NODE_USE_ENV_PROXY = `1` ;
1464+ }
14731465 process . env . AUTH_TYPE = authType ; // See `_registryServer.mjs`
14741466 process . env . COREPACK_INTEGRITY_KEYS = `` ;
14751467 } ) ;
0 commit comments