From aa65c8f6aabb36c9fd9e7b58e7047e1acbba19c4 Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Mon, 28 Oct 2024 19:03:39 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=85(vitest)=20Make=20tests=20run=20concur?= =?UTF-8?q?rently?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vitest/test/vitest-fast-check.spec.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/vitest/test/vitest-fast-check.spec.ts b/packages/vitest/test/vitest-fast-check.spec.ts index 0db421e0304..433ff8657ac 100644 --- a/packages/vitest/test/vitest-fast-check.spec.ts +++ b/packages/vitest/test/vitest-fast-check.spec.ts @@ -35,7 +35,7 @@ describe.each([ { specName: 'test', runnerName: 'test' }, { specName: 'it', runnerName: 'it' }, ])('$specName', ({ runnerName }) => { - it(`should support ${runnerName}.prop`, async () => { + it.concurrent(`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) => { @@ -51,7 +51,7 @@ describe.each([ }); describe('at depth 1', () => { - it(`should support ${runnerName}.concurrent.prop`, async () => { + it.concurrent(`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) => { @@ -66,7 +66,7 @@ describe.each([ expectPass(out, specFileName); }); - it(`should support ${runnerName}.fails.prop`, async () => { + it.concurrent(`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) => { @@ -96,7 +96,7 @@ describe.each([ expectPass(out, specFileName); }); - it(`should support ${runnerName}.skip.prop`, async () => { + it.concurrent(`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) => { @@ -111,7 +111,7 @@ describe.each([ expectSkip(out, specFileName); }); - it(`should support ${runnerName}.todo.prop`, async () => { + it.concurrent(`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) => { @@ -128,7 +128,7 @@ describe.each([ }); describe('at depth strictly above 1', () => { - it(`should support ${runnerName}.concurrent.fails.prop`, async () => { + it.concurrent(`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) => { @@ -143,7 +143,7 @@ describe.each([ expectFail(out, specFileName); }); - it(`should support ${runnerName}.concurrent.fails.only.prop`, async () => { + it.concurrent(`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) => { @@ -158,7 +158,7 @@ describe.each([ expectFail(out, specFileName); }); - it(`should support ${runnerName}.concurrent.fails.skip.prop`, async () => { + it.concurrent(`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) => { @@ -173,7 +173,7 @@ describe.each([ expectSkip(out, specFileName); }); - it(`should support ${runnerName}.concurrent.fails.todo.prop`, async () => { + it.concurrent(`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) => {