File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,9 @@ function displayTestSuite(tSuite) {
128
128
}
129
129
} ) ;
130
130
131
+ const totalTime = tSuite . tests . reduce ( ( a , b ) => a + b . timeTaken , 0 ) ;
131
132
process . stdout . write (
132
- `\nTotal Time: ${ tSuite . totalTime } ms, Avg Time: ${ tSuite . totalTime /
133
+ `\nTotal Time: ${ totalTime } ms, Avg Time: ${ totalTime /
133
134
tSuite . tests
134
135
. length } ms\n_______________________________________________________________________________\n`,
135
136
) ;
@@ -152,7 +153,6 @@ fileScannerSync({
152
153
const tSuite = {
153
154
fileName : '' ,
154
155
funcName : '' ,
155
- totalTime : 0 ,
156
156
tests : [ ] ,
157
157
} ;
158
158
@@ -173,12 +173,10 @@ fileScannerSync({
173
173
tSuite . fileName = path . basename ( relativePath ) ;
174
174
tSuite . funcName = funcToBeTested . name ;
175
175
176
- tSuite . totalTime = 0 ;
177
176
tests [ testPath ] . tests . forEach ( ( test ) => {
178
177
const testRes = runTest ( test , funcToBeTested ) ;
179
178
180
179
tSuite . tests . push ( { ...test , ...testRes } ) ;
181
- tSuite . totalTime += testRes . timeTaken ;
182
180
183
181
if ( testRes . hasPassed ) {
184
182
totalTestsPassed ++ ;
You can’t perform that action at this time.
0 commit comments