Comparing version 1.1.3 to 1.1.4
@@ -182,2 +182,3 @@ var chalk = require('chalk'); | ||
//this race should be done within the timeout, self and all registered kids | ||
var toId; | ||
testObj.promise = Promise.race([ | ||
@@ -190,3 +191,3 @@ new Promise(function (resolve, reject) { | ||
new Promise(function (resolve, reject) { | ||
setTimeout(function () { | ||
toId = setTimeout(function () { | ||
reject(new Error('Timeout ' + testObj._timeout + 'ms reached. Please fix the test or set `this.timeout(' + (testObj._timeout + 1000) + ');`.')); | ||
@@ -196,2 +197,3 @@ }, testObj._timeout); | ||
]).then(function () { | ||
clearTimeout(toId); | ||
testObj.time = now() - testObj.time; | ||
@@ -198,0 +200,0 @@ if (testObj.status !== 'group') testObj.status = 'success'; |
{ | ||
"name": "tst", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Minimalistic test runner for node/browser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12981
327