File tree Expand file tree Collapse file tree 1 file changed +22
-19
lines changed
packages/jest-circus/src/legacy-code-todo-rewrite Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -158,26 +158,29 @@ export const collectTestsWithoutRunning = async ({
158158 for ( const child of block . children ) {
159159 if ( child . type === 'describeBlock' ) {
160160 walk ( child , [ ...ancestors , child . name ] ) ;
161- } else if ( child . type === 'test' ) {
162- if ( ! testNamePattern || testNamePattern . test ( getTestID ( child ) ) ) {
163- const title = child . name ;
164- assertionResults . push ( {
165- ancestorTitles : [ ...ancestors ] ,
166- duration : null ,
167- failing : false ,
168- failureDetails : [ ] ,
169- failureMessages : [ ] ,
170- fullName : [ ...ancestors , title ] . join ( ' ' ) ,
171- invocations : 0 ,
172- location : null ,
173- numPassingAsserts : 0 ,
174- retryReasons : [ ] ,
175- startAt : null ,
176- status : 'pending' as Status ,
177- title,
178- } ) ;
179- }
161+ continue ;
180162 }
163+
164+ if ( testNamePattern && ! testNamePattern . test ( getTestID ( child ) ) ) {
165+ continue ;
166+ }
167+
168+ const title = child . name ;
169+ assertionResults . push ( {
170+ ancestorTitles : [ ...ancestors ] ,
171+ duration : null ,
172+ failing : false ,
173+ failureDetails : [ ] ,
174+ failureMessages : [ ] ,
175+ fullName : [ ...ancestors , title ] . join ( ' ' ) ,
176+ invocations : 0 ,
177+ location : null ,
178+ numPassingAsserts : 0 ,
179+ retryReasons : [ ] ,
180+ startAt : null ,
181+ status : 'pending' as Status ,
182+ title,
183+ } ) ;
181184 }
182185 } ;
183186 walk ( rootDescribeBlock , [ ] ) ;
You can’t perform that action at this time.
0 commit comments