DEV: Don't run conditionally skipped tests (#31326)

Those still run `QUnit.testStart`/`QUnit.testDone` callbacks, and doing
so with no actual test body leads to flaky behavior.
This commit is contained in:
Jarek Radosz 2025-02-13 04:27:21 +01:00 committed by GitHub
parent c3109f2ddd
commit cbe9a9f33b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@ import { setupApplicationTest } from "ember-qunit";
import $ from "jquery"; import $ from "jquery";
import MessageBus from "message-bus-client"; import MessageBus from "message-bus-client";
import { resetCache as resetOneboxCache } from "pretty-text/oneboxer"; import { resetCache as resetOneboxCache } from "pretty-text/oneboxer";
import QUnit, { module, skip, test } from "qunit"; import QUnit, { module, test } from "qunit";
import sinon from "sinon"; import sinon from "sinon";
import { clearAboutPageActivities } from "discourse/components/about-page"; import { clearAboutPageActivities } from "discourse/components/about-page";
import { resetCardClickListenerSelector } from "discourse/components/card-contents-base"; import { resetCardClickListenerSelector } from "discourse/components/card-contents-base";
@ -568,8 +568,6 @@ export async function selectText(selector, endOffset = null) {
export function conditionalTest(name, condition, testCase) { export function conditionalTest(name, condition, testCase) {
if (condition) { if (condition) {
test(name, testCase); test(name, testCase);
} else {
skip(name, testCase);
} }
} }