Skip to content

Commit ae6eeba

Browse files
pass all tests
1 parent 846694b commit ae6eeba

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/main/mocha.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as assert from 'assert';
12
import * as CircularJSON from 'circular-json';
23
import * as debug from 'debug';
34
import * 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,

src/main/process-pool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

src/main/runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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':

src/subprocess/runner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)