mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
16 lines
352 B
JavaScript
16 lines
352 B
JavaScript
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));
|
|
});
|
|
}
|