File tree Expand file tree Collapse file tree 3 files changed +143
-148
lines changed Expand file tree Collapse file tree 3 files changed +143
-148
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,10 @@ class Reporter {
33
33
this . _verbose = verbose ;
34
34
this . _summary = summary ;
35
35
this . _testCounter = 0 ;
36
- runner . on ( 'started' , this . _onStarted . bind ( this ) ) ;
37
- runner . on ( 'finished' , this . _onFinished . bind ( this ) ) ;
38
- runner . on ( 'teststarted' , this . _onTestStarted . bind ( this ) ) ;
39
- runner . on ( 'testfinished' , this . _onTestFinished . bind ( this ) ) ;
36
+ runner . setDelegate ( this ) ;
40
37
}
41
38
42
- _onStarted ( testRuns ) {
39
+ onStarted ( testRuns ) {
43
40
this . _testCounter = 0 ;
44
41
this . _timestamp = Date . now ( ) ;
45
42
const allTests = this . _runner . tests ( ) ;
@@ -83,7 +80,7 @@ class Reporter {
83
80
console . log ( '' ) ;
84
81
}
85
82
86
- _onFinished ( result ) {
83
+ onFinished ( result ) {
87
84
this . _printTestResults ( result ) ;
88
85
if ( ! result . ok ( ) )
89
86
this . _printFailedResult ( result ) ;
@@ -149,10 +146,10 @@ class Reporter {
149
146
console . log ( `Finished in ${ colors . yellow ( seconds ) } seconds` ) ;
150
147
}
151
148
152
- _onTestStarted ( testRun ) {
149
+ onTestRunStarted ( testRun ) {
153
150
}
154
151
155
- _onTestFinished ( testRun ) {
152
+ onTestRunFinished ( testRun ) {
156
153
if ( this . _verbose ) {
157
154
++ this . _testCounter ;
158
155
this . _printVerboseTestRunResult ( this . _testCounter , testRun ) ;
You can’t perform that action at this time.
0 commit comments