aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/karma/lib/browser_result.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/karma/lib/browser_result.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/karma/lib/browser_result.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/karma/lib/browser_result.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/karma/lib/browser_result.js
new file mode 100644
index 00000000..241e5a7d
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/karma/lib/browser_result.js
@@ -0,0 +1,25 @@
+var Result = function () {
+ var startTime = Date.now()
+
+ this.total = this.skipped = this.failed = this.success = 0
+ this.netTime = this.totalTime = 0
+ this.disconnected = this.error = false
+
+ this.totalTimeEnd = function () {
+ this.totalTime = Date.now() - startTime
+ }
+
+ this.add = function (result) {
+ if (result.skipped) {
+ this.skipped++
+ } else if (result.success) {
+ this.success++
+ } else {
+ this.failed++
+ }
+
+ this.netTime += result.time
+ }
+}
+
+module.exports = Result