mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
DEV: Allows moduleForWidget to use before/afterEach options (#9296)
This commit is contained in:
@ -1,7 +1,14 @@
|
|||||||
import componentTest from "helpers/component-test";
|
import componentTest from "helpers/component-test";
|
||||||
|
|
||||||
export function moduleForWidget(name) {
|
export function moduleForWidget(name, options = {}) {
|
||||||
moduleForComponent(name, `widget:${name}`, { integration: true });
|
moduleForComponent(
|
||||||
|
name,
|
||||||
|
`widget:${name}`,
|
||||||
|
Object.assign(
|
||||||
|
{ integration: true },
|
||||||
|
{ beforeEach: options.beforeEach, afterEach: options.afterEach }
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function widgetTest(name, opts) {
|
export function widgetTest(name, opts) {
|
||||||
|
Reference in New Issue
Block a user