diff --git a/ospec/change-log.md b/ospec/change-log.md index b4cadc5c..6171a587 100644 --- a/ospec/change-log.md +++ b/ospec/change-log.md @@ -16,7 +16,6 @@ _2018-xx-yy_ ### Bug fixes - Detect duplicate calls to `done()` properly [#2162](https://github.com/MithrilJS/mithril.js/issues/2162) ([#2167](https://github.com/MithrilJS/mithril.js/pull/2167)) -- Don't count `done()` calls as passing tests in the final tally [#2166](https://github.com/MithrilJS/mithril.js/issues/2166) ([#2167](https://github.com/MithrilJS/mithril.js/pull/2167)) - Don't try to report internal errors as assertion failures, throw them instead ([#2167](https://github.com/MithrilJS/mithril.js/pull/2167)) - Don't ignore, silently, tests whose name start with the test suite meta-information sequence (was `"__"` up to this version) ([#2167(https://github.com/MithrilJS/mithril.js/pull/2167)) - Fix the `done()` call detection logic [#2158](https://github.com/MithrilJS/mithril.js/issues/2158) and assorted fixes (accept non-English names, tolerate comments; [#2167](https://github.com/MithrilJS/mithril.js/pull/2167)) diff --git a/ospec/ospec.js b/ospec/ospec.js index ae8bc980..37b3f659 100644 --- a/ospec/ospec.js +++ b/ospec/ospec.js @@ -147,7 +147,9 @@ else window.o = m() } // for internal use only function finalizeAsync(err) { - if (err != null) { + if (err == null) { + if (task.err != null) succeed(new Assert) + } else { if (err instanceof Error) fail(new Assert, err.message, err) else fail(new Assert, String(err), null) }