mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-12 00:31:48 -05:00
17 lines
352 B
Text
17 lines
352 B
Text
|
import initializer from 'wizard/initializers/load-helpers';
|
||
|
|
||
|
export function componentTest(name, opts) {
|
||
|
opts = opts || {};
|
||
|
|
||
|
test(name, function(assert) {
|
||
|
initializer.initialize();
|
||
|
|
||
|
if (opts.setup) {
|
||
|
opts.setup.call(this);
|
||
|
}
|
||
|
|
||
|
andThen(() => this.render(opts.template));
|
||
|
andThen(() => opts.test.call(this, assert));
|
||
|
});
|
||
|
}
|