File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -144,25 +144,13 @@ async function runPoolTests() {
144144}
145145
146146function filterTestById ( testUid ) {
147- // Clear previous tests
147+ // Find and filter to only the specific test
148148 for ( const suite of mocha . suite . suites ) {
149- suite . tests = [ ]
150- }
151-
152- // Add only the specific test
153- for ( const suite of mocha . suite . suites ) {
154- const originalTests = suite . tests
155149 suite . tests = suite . tests . filter ( test => test . uid === testUid )
156-
157- // If we found the test, break out
158- if ( suite . tests . length > 0 ) {
159- break
160- }
161-
162- // Restore original tests for next iteration
163- suite . tests = originalTests
164150 }
165151}
152+
153+ function filterTests ( ) {
166154 const files = codecept . testFiles
167155 mocha . files = files
168156 mocha . loadFiles ( )
Original file line number Diff line number Diff line change @@ -343,6 +343,11 @@ class Workers extends EventEmitter {
343343 getNextTest ( ) {
344344 return this . testPool . shift ( ) || null
345345 }
346+
347+ /**
348+ * @param {Number } numberOfWorkers
349+ */
350+ createGroupsOfSuites ( numberOfWorkers ) {
346351 const files = this . codecept . testFiles
347352 const groups = populateGroups ( numberOfWorkers )
348353
You can’t perform that action at this time.
0 commit comments