This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/wizard/test/helpers/component-test.js.es6

17 lines
381 B
JavaScript

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