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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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