Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
lrsjng committed May 4, 2019
1 parent 1071abc commit 7aeee07
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions dist/scar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! scar v2.1.0 - https://larsjung.de/scar/ */
/*! scar v2.2.0 - https://larsjung.de/scar/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -257,12 +257,13 @@ function () {
return _this2.__TRACE_MARKER__();
});
return timeout(pr, _this2.timeout);
})["finally"](function () {
}).then(function () {
_this2.status = _this2.skip ? Test.SKIPPED : Test.PASSED;
_this2.duration = Date.now() - _this2.starttime;
})["catch"](function (err) {
_this2.status = Test.FAILED;
_this2.err = err;
}).then(function () {
_this2.duration = Date.now() - _this2.starttime;
});
return this.promise;
}
Expand Down
4 changes: 2 additions & 2 deletions dist/scar.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ class Test {
const pr = Promise.resolve().then(() => this.__TRACE_MARKER__());
return timeout(pr, this.timeout);
})
.finally(() => {
.then(() => {
this.status = this.skip ? Test.SKIPPED : Test.PASSED;
this.duration = Date.now() - this.starttime;
})
.catch(err => {
this.status = Test.FAILED;
this.err = err;
})
.then(() => {
this.duration = Date.now() - this.starttime;
});
return this.promise;
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scar",
"version": "2.1.0",
"version": "2.2.0",
"description": "Test runner for Node.js and the browser.",
"homepage": "https://larsjung.de/scar/",
"bugs": "https://github.com/lrsjng/scar/issues",
Expand Down

0 comments on commit 7aeee07

Please sign in to comment.