discourse/app/assets/javascripts/wizard/test/helpers/component-test.js.es6
2018-06-15 17:03:24 +02:00

17 lines
375 B
JavaScript

import initializer from "wizard/initializers/load-helpers";
export function componentTest(name, opts) {
opts = opts || {};
test(name, function(assert) {
initializer.initialize(this.registry);
if (opts.beforeEach) {
opts.beforeEach.call(this);
}
andThen(() => this.render(opts.template));
andThen(() => opts.test.call(this, assert));
});
}