mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
DEV: Allows moduleForWidget to use before/afterEach options (#9296)
This commit is contained in:
parent
96e841a635
commit
acdbcabd0e
@ -1,7 +1,14 @@
|
||||
import componentTest from "helpers/component-test";
|
||||
|
||||
export function moduleForWidget(name) {
|
||||
moduleForComponent(name, `widget:${name}`, { integration: true });
|
||||
export function moduleForWidget(name, options = {}) {
|
||||
moduleForComponent(
|
||||
name,
|
||||
`widget:${name}`,
|
||||
Object.assign(
|
||||
{ integration: true },
|
||||
{ beforeEach: options.beforeEach, afterEach: options.afterEach }
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function widgetTest(name, opts) {
|
||||
|
Loading…
Reference in New Issue
Block a user