diff --git a/test/core/test/cli-test.test.ts b/test/core/test/cli-test.test.ts index 254359ccd7a0..b40ff72f9efc 100644 --- a/test/core/test/cli-test.test.ts +++ b/test/core/test/cli-test.test.ts @@ -223,6 +223,13 @@ test('cache is parsed correctly', () => { }) }) +test('shuffle is parsed correctly', () => { + expect(getCLIOptions('--sequence.shuffle')).toEqual({ sequence: { shuffle: true } }) + expect(getCLIOptions('--sequence.shuffle=false')).toEqual({ sequence: { shuffle: false } }) + expect(getCLIOptions('--sequence.shuffle.files --sequence.shuffle.tests')).toEqual({ sequence: { shuffle: { files: true, tests: true } } }) + expect(getCLIOptions('--sequence.shuffle.files=false --sequence.shuffle.tests=false')).toEqual({ sequence: { shuffle: { files: false, tests: false } } }) +}) + test('typecheck correctly passes down arguments', () => { const { options, args } = parseArguments('--typecheck some.name.ts') expect(options).toEqual({ typecheck: { enabled: true } }) @@ -330,13 +337,4 @@ test('public parseCLI works correctly', () => { 'color': true, }, }) - - expect(parseCLI('vitest --sequence.shuffle.files --sequence.shuffle.tests=false')).toEqual({ - filter: [], - options: { - 'sequence': { shuffle: { files: true, tests: false } }, - '--': [], - 'color': true, - }, - }) })