diff --git a/test/javascripts/helpers/component-test.js b/test/javascripts/helpers/component-test.js index 84f382a3b45..0330f6e91a1 100644 --- a/test/javascripts/helpers/component-test.js +++ b/test/javascripts/helpers/component-test.js @@ -55,12 +55,12 @@ export default function(name, opts) { }); andThen(() => { - try { - opts.test.call(this, assert); - } finally { - if (opts.afterEach) { - opts.afterEach.call(opts); - } + return opts.test.call(this, assert); + }).finally(() => { + if (opts.afterEach) { + andThen(() => { + return opts.afterEach.call(opts); + }); } }); });