mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 22:26:26 +08:00
DEV: Remove widget-test helpers file (#18011)
This commit is contained in:
parent
545bfcaca7
commit
ff0f43014c
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user