DEV: Allows moduleForWidget to use before/afterEach options (#9296)

This commit is contained in:
Joffrey JAFFEUX
2020-03-30 18:12:32 +02:00
committed by GitHub
parent 96e841a635
commit acdbcabd0e

View File

@ -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) {