DEV: Remove widget-test helpers file (#18011)

This commit is contained in:
Jarek Radosz 2022-08-21 09:20:45 +02:00 committed by GitHub
parent 545bfcaca7
commit ff0f43014c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,30 +0,0 @@
import { addPretenderCallback } from "discourse/tests/helpers/qunit-helpers";
import componentTest from "discourse/tests/helpers/component-test";
import { moduleForComponent } from "ember-qunit";
import { warn } from "@ember/debug";
import deprecated from "discourse-common/lib/deprecated";
export function moduleForWidget(name, options = {}) {
warn(
"moduleForWidget will not work in the Ember CLI environment. Please upgrade your tests.",
{ id: "module-for-widget" }
);
return;
let fullName = `widget:${name}`;
addPretenderCallback(fullName, options.pretend);
moduleForComponent(
name,
fullName,
Object.assign(
{ integration: true },
{ beforeEach: options.beforeEach, afterEach: options.afterEach }
)
);
}
export function widgetTest(name, opts) {
deprecated("Use `componentTest` instead of `widgetTest`");
return componentTest(name, opts);
}