A platform for community discussion. Free, open, simple.
DEV: Make component-test `afterEach` async aware (#10099)
Jarek Radosz0e2f7ecfd0db
diff --git a/test/javascripts/helpers/component-test.js b/test/javascripts/helpers/component-test.jsindex 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);+ });}});});