DEV: Correct core test run detection for theme-qunit (#20635)

Followup to 8f1a5c9392
This commit is contained in:
David Taylor 2023-03-10 12:40:59 +00:00 committed by GitHub
parent 8f1a5c9392
commit 3e8d349465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -388,11 +388,10 @@ export default function setupTests(config) {
reportMemoryUsageAfterTests();
patchFailedAssertion();
const hasPluginJs = Array.from(
document.querySelector("#dynamic-test-js").content.childNodes
).some((script) => script.dataset?.discoursePlugin);
const hasPluginJs = !!document.querySelector("script[data-discourse-plugin]");
const hasThemeJs = !!document.querySelector("script[data-theme-id]");
if (skipPlugins || !hasPluginJs) {
if (!hasPluginJs && !hasThemeJs) {
configureRaiseOnDeprecation();
}
}