@@ -53,7 +53,7 @@ export function createSuiteHooks() {
5353}
5454
5555// implementations
56- function createSuiteCollector ( name : string , factory : SuiteFactory = ( ) => { } , mode : RunMode , concurrent ?: boolean , shuffle ?: boolean , each ?: boolean , suiteOptions ?: TestOptions ) {
56+ function createSuiteCollector ( name : string , factory : SuiteFactory = ( ) => { } , mode : RunMode , concurrent ?: boolean , sequential ?: boolean , shuffle ?: boolean , each ?: boolean , suiteOptions ?: TestOptions ) {
5757 const tasks : ( Test | TaskCustom | Suite | SuiteCollector ) [ ] = [ ]
5858 const factoryQueue : ( Test | Suite | SuiteCollector ) [ ] = [ ]
5959
@@ -84,7 +84,7 @@ function createSuiteCollector(name: string, factory: SuiteFactory = () => { }, m
8484 meta : Object . create ( null ) ,
8585 } as Omit < Test , 'context' > as Test
8686
87- if ( this . concurrent || concurrent || runner . config . sequence . concurrent )
87+ if ( this . concurrent || ( ! sequential && ( concurrent || runner . config . sequence . concurrent ) ) )
8888 test . concurrent = true
8989 if ( shuffle )
9090 test . shuffle = true
@@ -198,7 +198,7 @@ function createSuite() {
198198 if ( currentSuite ?. options )
199199 options = { ...currentSuite . options , ...options }
200200
201- return createSuiteCollector ( formatName ( name ) , factory , mode , this . concurrent , this . shuffle , this . each , options )
201+ return createSuiteCollector ( formatName ( name ) , factory , mode , this . concurrent , this . sequence , this . shuffle , this . each , options )
202202 }
203203
204204 suiteFn . each = function < T > ( this : { withContext : ( ) => SuiteAPI ; setContext : ( key : string , value : boolean | undefined ) => SuiteAPI } , cases : ReadonlyArray < T > , ...args : any [ ] ) {
@@ -226,14 +226,14 @@ function createSuite() {
226226 suiteFn . runIf = ( condition : any ) => ( condition ? suite : suite . skip ) as SuiteAPI
227227
228228 return createChainable (
229- [ 'concurrent' , 'shuffle' , 'skip' , 'only' , 'todo' ] ,
229+ [ 'concurrent' , 'sequential' , ' shuffle', 'skip' , 'only' , 'todo' ] ,
230230 suiteFn ,
231231 ) as unknown as SuiteAPI
232232}
233233
234234function createTest ( fn : (
235235 (
236- this : Record < 'concurrent' | 'skip' | 'only' | 'todo' | 'fails' | 'each' , boolean | undefined > & { fixtures ?: FixtureItem [ ] } ,
236+ this : Record < 'concurrent' | 'sequential' | ' skip' | 'only' | 'todo' | 'fails' | 'each' , boolean | undefined > & { fixtures ?: FixtureItem [ ] } ,
237237 title : string ,
238238 fn ?: TestFunction ,
239239 options ?: number | TestOptions
0 commit comments