@@ -286,16 +286,16 @@ interface EachFunctionReturn<T extends any[]> {
286
286
(
287
287
name : string | Function ,
288
288
fn : ( ...args : T ) => Awaitable < void > ,
289
- options : TestOptions
289
+ options : TestCollectorOptions
290
290
) : void
291
291
(
292
292
name : string | Function ,
293
293
fn : ( ...args : T ) => Awaitable < void > ,
294
- options ?: number | TestOptions
294
+ options ?: number | TestCollectorOptions
295
295
) : void
296
296
(
297
297
name : string | Function ,
298
- options : TestOptions ,
298
+ options : TestCollectorOptions ,
299
299
fn : ( ...args : T ) => Awaitable < void >
300
300
) : void
301
301
}
@@ -316,7 +316,7 @@ interface TestForFunctionReturn<Arg, Context> {
316
316
) : void
317
317
(
318
318
name : string | Function ,
319
- options : TestOptions ,
319
+ options : TestCollectorOptions ,
320
320
fn : ( args : Arg , context : Context ) => Awaitable < void >
321
321
) : void
322
322
}
@@ -347,16 +347,16 @@ interface TestCollectorCallable<C = object> {
347
347
< ExtraContext extends C > (
348
348
name : string | Function ,
349
349
fn : TestFunction < ExtraContext > ,
350
- options : TestOptions
350
+ options : TestCollectorOptions
351
351
) : void
352
352
< ExtraContext extends C > (
353
353
name : string | Function ,
354
354
fn ?: TestFunction < ExtraContext > ,
355
- options ?: number | TestOptions
355
+ options ?: number | TestCollectorOptions
356
356
) : void
357
357
< ExtraContext extends C > (
358
358
name : string | Function ,
359
- options ?: TestOptions ,
359
+ options ?: TestCollectorOptions ,
360
360
fn ?: TestFunction < ExtraContext >
361
361
) : void
362
362
}
@@ -370,6 +370,8 @@ type ChainableTestAPI<ExtraContext = object> = ChainableFunction<
370
370
}
371
371
>
372
372
373
+ type TestCollectorOptions = Omit < TestOptions , 'shuffle' >
374
+
373
375
export interface TestOptions {
374
376
/**
375
377
* Test timeout.
@@ -399,6 +401,10 @@ export interface TestOptions {
399
401
* Tests inherit `sequential` from `describe()` and nested `describe()` will inherit from parent's `sequential`.
400
402
*/
401
403
sequential ?: boolean
404
+ /**
405
+ * Whether the tasks of the suite run in a random order.
406
+ */
407
+ shuffle ?: boolean
402
408
/**
403
409
* Whether the test should be skipped.
404
410
*/
0 commit comments