A platform for community discussion. Free, open, simple.
DEV: Remove the `options` argument of `acceptance` function (#37782)
Jarek Radosze2cd027506a6
diff --git a/frontend/discourse/tests/helpers/qunit-helpers.js b/frontend/discourse/tests/helpers/qunit-helpers.jsindex 4498a1e6878..48dffa97e72 100644--- a/frontend/discourse/tests/helpers/qunit-helpers.js+++ b/frontend/discourse/tests/helpers/qunit-helpers.js@@ -334,24 +334,10 @@ export function addPretenderCallback(name, fn) {}}-export function acceptance(name, optionsOrCallback) {+export function acceptance(name, callback) {name = `Acceptance: ${name}`;- let callback;let options = {};- if (typeof optionsOrCallback === "function") {- callback = optionsOrCallback;- } else if (typeof optionsOrCallback === "object") {- deprecated(- `${name}: The second parameter to \`acceptance\` should be a function that encloses your tests.`,- {- since: "2.6.0",- dropFrom: "2.9.0.beta1",- id: "discourse.qunit.acceptance-function",- }- );- options = optionsOrCallback;- }addPretenderCallback(name, options.pretend);