Skip to content

Commit c657b44

Browse files
committed
better skip
1 parent 8d5fbe1 commit c657b44

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

tests/Up.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ describe(`UpCommand`, () => {
3434
});
3535
});
3636

37-
it(`should update the ".corepack.env" file from the current project`, async () => {
37+
it(`should update the ".corepack.env" file from the current project`, async t => {
38+
// Skip that test on Node.js 18.x as it lacks support for .env files.
39+
if (process.version.startsWith(`v18.`)) t.skip();
3840
await Promise.all([
3941
`COREPACK_DEV_ENGINES_YARN=2.1.0\n`,
4042
`\nCOREPACK_DEV_ENGINES_YARN=2.1.0\n`,
@@ -68,7 +70,10 @@ describe(`UpCommand`, () => {
6870
})));
6971
});
7072

71-
it(`should update the ".other.env" file from the current project when configured to use that`, async () => {
73+
it(`should update the ".other.env" file from the current project when configured to use that`, async t => {
74+
// Skip that test on Node.js 18.x as it lacks support for .env files.
75+
if (process.version.startsWith(`v18.`)) t.skip();
76+
7277
await Promise.all([
7378
`COREPACK_DEV_ENGINES_YARN=2.1.0\n`,
7479
`\nCOREPACK_DEV_ENGINES_YARN=2.1.0\n`,

tests/Use.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ describe(`UseCommand`, () => {
3333
});
3434
});
3535

36-
it(`should update .corepack.env if present`, async () => {
36+
it(`should update .corepack.env if present`, async t => {
37+
// Skip that test on Node.js 18.x as it lacks support for .env files.
38+
if (process.version.startsWith(`v18.`)) t.skip();
39+
3740
await Promise.all([
3841
`COREPACK_DEV_ENGINES_YARN=1.1.0\n`,
3942
`\nCOREPACK_DEV_ENGINES_YARN=1.1.0\n`,
@@ -66,7 +69,10 @@ describe(`UseCommand`, () => {
6669
})));
6770
});
6871

69-
it(`should update .other.env if present`, async () => {
72+
it(`should update .other.env if present`, async t => {
73+
// Skip that test on Node.js 18.x as it lacks support for .env files.
74+
if (process.version.startsWith(`v18.`)) t.skip();
75+
7076
await Promise.all([
7177
`COREPACK_DEV_ENGINES_YARN=1.1.0\n`,
7278
`\nCOREPACK_DEV_ENGINES_YARN=1.1.0\n`,

tests/main.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ it(`should use hash from env even when "devEngines" defines a different one`, as
315315
});
316316

317317
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.
318+
// Skip that test on Node.js 18.x as it lacks support for .env files.
319319
if (process.version.startsWith(`v18.`)) t.skip();
320320

321321
await xfs.mktempPromise(async cwd => {
@@ -340,7 +340,7 @@ it(`should use hash from env even when ".corepack.env" defines a different one`,
340340

341341
describe(`should accept range in devEngines only if a specific version is provided`, () => {
342342
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.
343+
// Skip that test on Node.js 18.x as it lacks support for .env files.
344344
if (process.version.startsWith(`v18.`)) t.skip();
345345

346346
await xfs.mktempPromise(async cwd => {
@@ -368,7 +368,7 @@ describe(`should accept range in devEngines only if a specific version is provid
368368
});
369369
});
370370
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.
371+
// Skip that test on Node.js 18.x as it lacks support for .env files.
372372
if (process.version.startsWith(`v18.`)) t.skip();
373373

374374
await xfs.mktempPromise(async cwd => {
@@ -455,7 +455,7 @@ describe(`should accept range in devEngines only if a specific version is provid
455455
});
456456

457457
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.
458+
// Skip that test on Node.js 18.x as it lacks support for .env files.
459459
if (process.version.startsWith(`v18.`)) t.skip();
460460

461461
await xfs.mktempPromise(async cwd => {
@@ -497,7 +497,7 @@ it(`Should use version from correct source`, async t => {
497497

498498
describe(`should reject if range in devEngines does not match version provided`, () => {
499499
it(`in .corepack.env`, async t => {
500-
// Skip rest of the test on Node.js 18.x as it lacks support for .env files.
500+
// Skip that test on Node.js 18.x as it lacks support for .env files.
501501
if (process.version.startsWith(`v18.`)) t.skip();
502502

503503
await xfs.mktempPromise(async cwd => {

0 commit comments

Comments
 (0)