source: trip-planner-front/node_modules/karma/lib/browser_result.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 558 bytes
Line 
1'use strict'
2
3class BrowserResult {
4 constructor (total = 0) {
5 this.startTime = Date.now()
6
7 this.total = total
8 this.skipped = this.failed = this.success = 0
9 this.netTime = this.totalTime = 0
10 this.disconnected = this.error = false
11 }
12
13 totalTimeEnd () {
14 this.totalTime = Date.now() - this.startTime
15 }
16
17 add (result) {
18 if (result.skipped) {
19 this.skipped++
20 } else if (result.success) {
21 this.success++
22 } else {
23 this.failed++
24 }
25
26 this.netTime += result.time
27 }
28}
29
30module.exports = BrowserResult
Note: See TracBrowser for help on using the repository browser.