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

View File

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