Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅(vitest) Make tests run concurrently #5380

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/vitest/test/vitest-fast-check.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe.each<DescribeOptions>([
{ 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) => {
Expand All @@ -51,7 +51,7 @@ describe.each<DescribeOptions>([
});

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) => {
Expand All @@ -66,7 +66,7 @@ describe.each<DescribeOptions>([
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) => {
Expand Down Expand Up @@ -96,7 +96,7 @@ describe.each<DescribeOptions>([
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) => {
Expand All @@ -111,7 +111,7 @@ describe.each<DescribeOptions>([
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) => {
Expand All @@ -128,7 +128,7 @@ describe.each<DescribeOptions>([
});

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) => {
Expand All @@ -143,7 +143,7 @@ describe.each<DescribeOptions>([
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) => {
Expand All @@ -158,7 +158,7 @@ describe.each<DescribeOptions>([
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) => {
Expand All @@ -173,7 +173,7 @@ describe.each<DescribeOptions>([
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) => {
Expand Down
Loading