File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -707,13 +707,13 @@ function createSuite() {
707707 }
708708
709709 suiteFn . for = function < T > (
710- this : {
711- withContext : ( ) => SuiteAPI
712- setContext : ( key : string , value : boolean | undefined ) => SuiteAPI
713- } ,
710+ this : SuiteAPI ,
714711 cases : ReadonlyArray < T > ,
715712 ...args : any [ ]
716713 ) {
714+ const context = getChainableContext ( this )
715+ const suite = context . withContext ( )
716+
717717 if ( Array . isArray ( cases ) && args . length ) {
718718 cases = formatTemplateString ( cases , args )
719719 }
Original file line number Diff line number Diff line change @@ -33,3 +33,13 @@ describe.for([
3333 expect ( a + b ) . matchSnapshot ( )
3434 } )
3535} )
36+
37+ // Regression test: describe.concurrent.for should propagate the concurrent flag
38+ // to the generated suites, matching how describe.for and test.concurrent.for behave.
39+ describe . concurrent . for ( [ 1 , 2 ] ) ( 'concurrent %i' , ( item ) => {
40+ test ( 'is marked concurrent' , ( { task } ) => {
41+ expect ( task . suite ! . concurrent ) . toBe ( true )
42+ expect ( task . concurrent ) . toBe ( true )
43+ expect ( item ) . toBeGreaterThan ( 0 )
44+ } )
45+ } )
You can’t perform that action at this time.
0 commit comments