Describe the bug
Found yet another bug that indirectly causes test.sequential vs test(..., { concurrent: false }) behavior divergence.
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
tags: [
{
name: 'my-tag',
timeout: 5000,
repeats: 2,
concurrent: false,
},
],
},
});
import { describe, test } from 'vitest';
describe(
'with suite options',
{ timeout: 1000, repeats: 1, concurrent: true },
() => {
test('bad', { tags: ['my-tag'] }, ({ task }) => {
console.log({
timeout: task.timeout,
repeats: task.repeats,
concurrent: task.concurrent,
});
});
}
);
describe('without suite options', () => {
test('good', { tags: ['my-tag'] }, ({ task }) => {
console.log({
timeout: task.timeout,
repeats: task.repeats,
concurrent: task.concurrent,
});
});
});
The test run outputs:
stdout | test/repro.test.ts > with suite options > bad
{ timeout: 1000, repeats: 1, concurrent: true }
stdout | test/repro.test.ts > with suite options > bad
{ timeout: 1000, repeats: 1, concurrent: true }
stdout | test/repro.test.ts > without suite options > good
{ timeout: 5000, repeats: 2, concurrent: undefined }
stdout | test/repro.test.ts > without suite options > good
{ timeout: 5000, repeats: 2, concurrent: undefined }
stdout | test/repro.test.ts > without suite options > good
{ timeout: 5000, repeats: 2, concurrent: undefined }
✓ test/repro.test.ts (2 tests) 6ms
✓ with suite options (1)
✓ bad 3ms (repeat x1)
✓ without suite options (1)
✓ good 2ms (repeat x2)
I expect the inner tags options should override suite options.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-3uvkkhlm?file=vite.config.ts
System Info
Used Package Manager
npm
Validations
Describe the bug
Found yet another bug that indirectly causes
test.sequentialvstest(..., { concurrent: false })behavior divergence.The test run outputs:
I expect the inner
tagsoptions should override suite options.Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-3uvkkhlm?file=vite.config.ts
System Info
Used Package Manager
npm
Validations