[ospec] Restore the assertion success on async test finalization in time

This commit is contained in:
Pierre-Yves Gérardy 2018-05-27 23:09:51 +02:00 committed by Pierre-Yves Gérardy
parent 8ebf036b8c
commit 25975c5ce4
2 changed files with 3 additions and 2 deletions

View file

@ -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))

View file

@ -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)
}