@@ -65,9 +65,9 @@ export default class QUnitAdapter extends EventEmitter {
65
65
globalSuite . name = undefined
66
66
67
67
// The suiteName of global tests must be undefined.
68
- for ( let test of globalSuite . tests ) {
68
+ globalSuite . tests . forEach ( function ( test ) {
69
69
test . suiteName = undefined
70
- }
70
+ } )
71
71
72
72
modules = this . QUnit . config . modules . slice ( 1 )
73
73
} else {
@@ -88,7 +88,7 @@ export default class QUnitAdapter extends EventEmitter {
88
88
//
89
89
// If a suite does not have a composed name, add it to the topLevelSuites,
90
90
// this means that this suite is the direct child of the global suite.
91
- for ( let suite of suites ) {
91
+ suites . forEach ( function ( suite ) {
92
92
let indexEnd = suite . name . lastIndexOf ( ' > ' )
93
93
94
94
if ( indexEnd !== - 1 ) {
@@ -103,15 +103,15 @@ export default class QUnitAdapter extends EventEmitter {
103
103
// Keep only the name of the suite itself.
104
104
suite . name = suite . name . substring ( indexEnd + 3 )
105
105
106
- for ( let parentSuite of suites ) {
106
+ suites . forEach ( function ( parentSuite ) {
107
107
if ( parentSuite . name === parentSuiteName ) {
108
108
parentSuite . childSuites . push ( suite )
109
109
}
110
- }
110
+ } )
111
111
} else {
112
112
topLevelSuites . push ( suite )
113
113
}
114
- }
114
+ } )
115
115
116
116
globalSuite . childSuites = topLevelSuites
117
117
@@ -144,16 +144,16 @@ export default class QUnitAdapter extends EventEmitter {
144
144
}
145
145
146
146
emitData ( suite ) {
147
- for ( let test of suite . tests ) {
147
+ suite . tests . forEach ( ( test ) => {
148
148
this . emit ( 'testStart' , this . createTestStart ( test ) )
149
149
this . emit ( 'testEnd' , this . createTestEnd ( test ) )
150
- }
150
+ } )
151
151
152
- for ( let suite of suite . childSuites ) {
153
- this . emit ( 'suiteStart' , this . createSuiteStart ( suite ) )
154
- this . emitData ( suite )
155
- this . emit ( 'suiteEnd' , this . createSuiteEnd ( suite ) )
156
- }
152
+ suite . childSuites . forEach ( ( childSuite ) => {
153
+ this . emit ( 'suiteStart' , this . createSuiteStart ( childSuite ) )
154
+ this . emitData ( childSuite )
155
+ this . emit ( 'suiteEnd' , this . createSuiteEnd ( childSuite ) )
156
+ } )
157
157
}
158
158
159
159
onBegin ( ) {
0 commit comments