diff --git a/src/tests/frontend/runner.js b/src/tests/frontend/runner.js index 7389c13ee..31fb6d241 100644 --- a/src/tests/frontend/runner.js +++ b/src/tests/frontend/runner.js @@ -138,24 +138,15 @@ $(() => { const getURLParameter = (name) => (new URLSearchParams(location.search)).get(name); - // get the list of specs and filter it if requested - const specs = specs_list.slice(); - const absUrl = (url) => new URL(url, window.location.href).href; require.setRootURI(absUrl('../../javascripts/src')); require.setLibraryURI(absUrl('../../javascripts/lib')); require.setGlobalKeyPath('require'); - // inject spec scripts into the dom const $body = $('body'); - $.each(specs, (i, spec) => { - // if the spec isn't a plugin spec which means the spec file might be in a different subfolder - if (!spec.startsWith('/')) { - $body.append(``); - } else { - $body.append(``); - } - }); + for (const spec of specs_list.map((spec) => encodeURI(spec))) { + $body.append($('