File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1+ import * as assert from 'assert' ;
12import * as CircularJSON from 'circular-json' ;
23import * as debug from 'debug' ;
34import * as Mocha from 'mocha' ;
@@ -224,6 +225,7 @@ export default class MochaWrapper extends Mocha {
224225 syncedSubprocessData,
225226 } ) ;
226227 } else {
228+ assert ( event ) ;
227229 events . push ( {
228230 data,
229231 event,
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ export default class ProcessPool {
3232
3333 if ( this . processes . length >= this . maxParallel ) {
3434 const process : IMochaProcess = await new Promise < IMochaProcess > ( ( resolve ) => {
35- this . waitingList . push ( ( process : IMochaProcess ) => {
36- resolve ( process ) ;
35+ this . waitingList . push ( ( proc : IMochaProcess ) => {
36+ resolve ( proc ) ;
3737 } ) ;
3838 } ) ;
3939 return process ;
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ export default class RunnerMain extends Runner {
149149 private emitSubprocessEvents ( ) {
150150 for ( const { event, data, type } of this . subprocessTestResults . events ) {
151151 if ( type === 'runner' ) {
152+ assert ( event ) ;
152153 switch ( event ) {
153154 case 'start' :
154155 case 'end' :
Original file line number Diff line number Diff line change @@ -183,6 +183,8 @@ class Reporter extends reporters.Base {
183183 event : 'sync' ,
184184 } ) ;
185185
186+ assert ( event ) ;
187+
186188 // and then send the event
187189 process . send ! ( { event, data } ) ;
188190 }
@@ -232,7 +234,5 @@ process.on('message', (msg) => {
232234
233235 mocha . reporter ( Reporter ) . run ( ( code ) => {
234236 onComplete ( code ) ;
235- const sendFn = false ? '' : 'send' ;
236- process [ sendFn ] ( JSON . stringify ( { event : 'end-test' , code } ) ) ;
237237 } ) ;
238238} ) ;
You can’t perform that action at this time.
0 commit comments