diff --git a/lib/metaltest.js b/lib/metaltest.js index 8e5aa64..8c3dbbc 100644 --- a/lib/metaltest.js +++ b/lib/metaltest.js @@ -43,7 +43,7 @@ const metaltest = (title) => { } runner.run = async (...reporters) => { - notify(reporters, 'start', title) + await notify(reporters, 'start', title) const tests = only.length ? only : suite for (const test of tests) { @@ -55,7 +55,7 @@ const metaltest = (title) => { } catch (error) { stats('fail', test, error) - notify(reporters, 'fail', test, error) + await notify(reporters, 'fail', test, error) } } @@ -64,17 +64,17 @@ const metaltest = (title) => { await test.fn(stats()) stats('success', test) - notify(reporters, 'success', test) + await notify(reporters, 'success', test) } catch (error) { stats('fail', test, error) - notify(reporters, 'fail', test, error) + await notify(reporters, 'fail', test, error) } } for (const fn of after) await fn() const r = stats() - notify(reporters, 'end', r) + await notify(reporters, 'end', r) return r }