Skip to content

Commit

Permalink
💚 Drop usages of it.concurrent due to Node 23 failing
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz authored Oct 19, 2024
1 parent 79fda36 commit 58271da
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
58 changes: 29 additions & 29 deletions packages/jest/test/jest-fast-check.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe.each<DescribeOptions>([
])('$specName', ({ runnerName, useWorkers, testRunner }) => {
const options = { useWorkers, testRunner };

it.concurrent('should pass on successful no prop mode', async () => {
it('should pass on successful no prop mode', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner('successful no prop', () => {
Expand All @@ -70,7 +70,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] successful no prop/);
});

it.concurrent('should fail on failing no prop mode', async () => {
it('should fail on failing no prop mode', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner('failing no prop', () => {
Expand All @@ -87,7 +87,7 @@ describe.each<DescribeOptions>([
});

if (useWorkers) {
it.concurrent('should fail on property blocking the main thread', async () => {
it('should fail on property blocking the main thread', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.nat()], { timeout: 500 })('property block main thread', () => {
Expand All @@ -104,7 +104,7 @@ describe.each<DescribeOptions>([
});
}

it.concurrent('should pass on truthy synchronous property', async () => {
it('should pass on truthy synchronous property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.string(), fc.string(), fc.string()])('property pass sync', (a, b, c) => {
Expand All @@ -120,7 +120,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] property pass sync \(with seed=-?\d+\)/);
});

it.concurrent('should pass on truthy asynchronous property', async () => {
it('should pass on truthy asynchronous property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.string(), fc.string(), fc.string()])('property pass async', async (a, b, c) => {
Expand All @@ -137,7 +137,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] property pass async \(with seed=-?\d+\)/);
});

it.concurrent('should fail on falsy synchronous property', async () => {
it('should fail on falsy synchronous property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.nat()])('property fail sync', (a) => {
Expand All @@ -154,7 +154,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property fail sync \(with seed=-?\d+\)/);
});

it.concurrent('should fail on falsy asynchronous property', async () => {
it('should fail on falsy asynchronous property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.nat()])('property fail async', async (a) => {
Expand All @@ -172,7 +172,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property fail async \(with seed=-?\d+\)/);
});

it.concurrent('should pass on truthy record-based property', async () => {
it('should pass on truthy record-based property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop({ a: fc.string(), b: fc.string(), c: fc.string() })('property pass record', ({ a, b, c }) => {
Expand All @@ -191,7 +191,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] property pass record \(with seed=-?\d+\)/);
});

it.concurrent('should fail on falsy record-based property', async () => {
it('should fail on falsy record-based property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop({ a: fc.string(), b: fc.string(), c: fc.string() })('property fail record', ({ a, b, c }) => {
Expand All @@ -208,7 +208,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property fail record \(with seed=-?\d+\)/);
});

it.concurrent('should fail on falsy record-based property with seed', async () => {
it('should fail on falsy record-based property with seed', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop({ a: fc.string(), b: fc.string(), c: fc.string() }, { seed: 4869 })(
Expand All @@ -226,7 +226,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property fail record seeded \(with seed=4869\)/);
});

it.concurrent('should fail with locally requested seed', async () => {
it('should fail with locally requested seed', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.constant(null)], { seed: 4242 })('property fail with locally requested seed', (_unused) => false);
Expand All @@ -241,7 +241,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property fail with locally requested seed \(with seed=4242\)/);
});

it.concurrent('should fail with globally requested seed', async () => {
it('should fail with globally requested seed', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
fc.configureGlobal({ seed: 4848 });
Expand All @@ -257,7 +257,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property fail with globally requested seed \(with seed=4848\)/);
});

it.concurrent('should fail with seed requested at jest level', async () => {
it('should fail with seed requested at jest level', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.constant(null)])('property fail with globally requested seed', (_unused) => false);
Expand All @@ -273,7 +273,7 @@ describe.each<DescribeOptions>([
});

describe('.skip', () => {
it.concurrent('should never be executed', async () => {
it('should never be executed', async () => {
// Arrange
const { jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.skip.prop([fc.constant(null)])('property never executed', (_unused) => false);
Expand All @@ -290,7 +290,7 @@ describe.each<DescribeOptions>([

if (testRunner === undefined) {
describe('.failing', () => {
it.concurrent('should fail on successful no prop mode', async () => {
it('should fail on successful no prop mode', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.failing('successful no prop', () => {
Expand All @@ -306,7 +306,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] successful no prop/);
});

it.concurrent('should pass on failing no prop mode', async () => {
it('should pass on failing no prop mode', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.failing('failing no prop', () => {
Expand All @@ -322,7 +322,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] failing no prop/);
});

it.concurrent('should pass because failing', async () => {
it('should pass because failing', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.failing.prop([fc.constant(null)])('property pass because failing', async (_unused) => false);
Expand All @@ -336,7 +336,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] property pass because failing \(with seed=-?\d+\)/);
});

it.concurrent('should fail because passing', async () => {
it('should fail because passing', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.failing.prop([fc.constant(null)])('property fail because passing', async (_unused) => true);
Expand All @@ -353,7 +353,7 @@ describe.each<DescribeOptions>([
}

describe('.concurrent', () => {
it.concurrent('should pass on truthy property', async () => {
it('should pass on truthy property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.concurrent.prop([fc.constant(null)])('property pass on truthy property', (_unused) => true);
Expand All @@ -367,7 +367,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] property pass on truthy property \(with seed=-?\d+\)/);
});

it.concurrent('should fail on falsy property', async () => {
it('should fail on falsy property', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.concurrent.prop([fc.constant(null)])('property fail on falsy property', (_unused) => false);
Expand All @@ -384,7 +384,7 @@ describe.each<DescribeOptions>([

if (testRunner === undefined) {
describe('.failing', () => {
it.concurrent('should pass because failing', async () => {
it('should pass because failing', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.concurrent.failing.prop([fc.constant(null)])(
Expand All @@ -401,7 +401,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[√✓] property pass because failing \(with seed=-?\d+\)/);
});

it.concurrent('should fail because passing', async () => {
it('should fail because passing', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.concurrent.failing.prop([fc.constant(null)])(
Expand All @@ -422,7 +422,7 @@ describe.each<DescribeOptions>([
});

describe('timeout', () => {
it.concurrent('should fail as test takes longer than global Jest timeout', async () => {
it('should fail as test takes longer than global Jest timeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.nat()])('property takes longer than global Jest timeout', async () => {
Expand All @@ -439,7 +439,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property takes longer than global Jest timeout/);
});

it.concurrent('should fail as test takes longer than Jest local timeout', async () => {
it('should fail as test takes longer than Jest local timeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.nat()])(
Expand All @@ -460,7 +460,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property takes longer than Jest local timeout/);
});

it.concurrent('should fail as test takes longer than Jest config timeout', async () => {
it('should fail as test takes longer than Jest config timeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(
runnerName,
Expand All @@ -481,7 +481,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property takes longer than Jest config timeout/);
});

it.concurrent('should fail as test takes longer than Jest setTimeout', async () => {
it('should fail as test takes longer than Jest setTimeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
if (typeof jest !== 'undefined') {
Expand All @@ -501,7 +501,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property takes longer than Jest setTimeout/);
});

it.concurrent('should fail as test takes longer than Jest CLI timeout', async () => {
it('should fail as test takes longer than Jest CLI timeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
runner.prop([fc.nat()])('property takes longer than Jest CLI timeout', async () => {
Expand All @@ -518,7 +518,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property takes longer than Jest CLI timeout/);
});

it.concurrent('should fail but favor local Jest timeout over Jest setTimeout', async () => {
it('should fail but favor local Jest timeout over Jest setTimeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
if (typeof jest !== 'undefined') {
Expand All @@ -542,7 +542,7 @@ describe.each<DescribeOptions>([
expect(out).toMatch(/[×✕] property favor local Jest timeout over Jest setTimeout/);
});

it.concurrent('should fail but favor Jest setTimeout over Jest CLI timeout', async () => {
it('should fail but favor Jest setTimeout over Jest CLI timeout', async () => {
// Arrange
const { specFileName, jestConfigRelativePath } = await writeToFile(runnerName, options, () => {
if (typeof jest !== 'undefined') {
Expand Down
20 changes: 10 additions & 10 deletions packages/vitest/test/vitest-fast-check.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe.each<DescribeOptions>([
{ specName: 'test', runnerName: 'test' },
{ specName: 'it', runnerName: 'it' },
])('$specName', ({ runnerName }) => {
it.concurrent(`should support ${runnerName}.prop`, async () => {
it(`should support ${runnerName}.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -53,7 +53,7 @@ describe.each<DescribeOptions>([
});

describe('at depth 1', () => {
it.concurrent(`should support ${runnerName}.concurrent.prop`, async () => {
it(`should support ${runnerName}.concurrent.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.concurrent.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -68,7 +68,7 @@ describe.each<DescribeOptions>([
expectPass(out, specFileName);
});

it.concurrent(`should support ${runnerName}.fails.prop`, async () => {
it(`should support ${runnerName}.fails.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.fails.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -83,7 +83,7 @@ describe.each<DescribeOptions>([
expectFail(out, specFileName);
});

it.concurrent.skip(`should support ${runnerName}.only.prop`, async () => {
it.skip(`should support ${runnerName}.only.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.only.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -98,7 +98,7 @@ describe.each<DescribeOptions>([
expectPass(out, specFileName);
});

it.concurrent(`should support ${runnerName}.skip.prop`, async () => {
it(`should support ${runnerName}.skip.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.skip.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -113,7 +113,7 @@ describe.each<DescribeOptions>([
expectSkip(out, specFileName);
});

it.concurrent(`should support ${runnerName}.todo.prop`, async () => {
it(`should support ${runnerName}.todo.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.todo.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -130,7 +130,7 @@ describe.each<DescribeOptions>([
});

describe('at depth strictly above 1', () => {
it.concurrent(`should support ${runnerName}.concurrent.fails.prop`, async () => {
it(`should support ${runnerName}.concurrent.fails.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.concurrent.fails.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -145,7 +145,7 @@ describe.each<DescribeOptions>([
expectFail(out, specFileName);
});

it.concurrent(`should support ${runnerName}.concurrent.fails.only.prop`, async () => {
it(`should support ${runnerName}.concurrent.fails.only.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.concurrent.fails.only.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -160,7 +160,7 @@ describe.each<DescribeOptions>([
expectFail(out, specFileName);
});

it.concurrent(`should support ${runnerName}.concurrent.fails.skip.prop`, async () => {
it(`should support ${runnerName}.concurrent.fails.skip.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.concurrent.fails.skip.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand All @@ -175,7 +175,7 @@ describe.each<DescribeOptions>([
expectSkip(out, specFileName);
});

it.concurrent(`should support ${runnerName}.concurrent.fails.todo.prop`, async () => {
it(`should support ${runnerName}.concurrent.fails.todo.prop`, async () => {
// Arrange
const { specFileName, vitestConfigRelativePath: jestConfigRelativePath } = await writeToFile(runnerName, () => {
runner.concurrent.fails.todo.prop([fc.string(), fc.string(), fc.string()])('property', (a, b, c) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('Playground', () => {
for (const [specLabel, specCode] of Object.entries(allQueueSpecs)) {
const expectedSuccess = snippet.greenTests.includes(specLabel);
const friendlyStatus = expectedSuccess ? 'pass' : 'fail';
it.concurrent(`should ${friendlyStatus} on ${specLabel}`, async () => {
it(`should ${friendlyStatus} on ${specLabel}`, async () => {
const seed = Math.random().toString(16).substring(2);
const testDirectoryName = `test-${seed}`;
const testDirectoryPath = path.join(generatedTestsDirectory, testDirectoryName);
Expand Down

0 comments on commit 58271da

Please sign in to comment.