mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Remove widget-test helpers file (#18011)
This commit is contained in:
@@ -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);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user