summaryrefslogtreecommitdiffstats
path: root/tests/mock_utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mock_utils.js')
-rw-r--r--tests/mock_utils.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/mock_utils.js b/tests/mock_utils.js
index 2d7d2e5..311e9dc 100644
--- a/tests/mock_utils.js
+++ b/tests/mock_utils.js
@@ -23,3 +23,14 @@ module.exports.sleep = function(time) {
resolve();
}, time));
};
+
+module.exports.ActionTimer = class ActionTimer {
+ constructor() {
+ this.started = Date.now();
+ }
+ get step() {
+ let num = Date.now() - this.started;
+ return ("000000" + num).slice(-Math.max(5, (""+num).length));
+ }
+};
+