tests: Send frontend test spec list as JSON

This commit is contained in:
Richard Hansen 2021-05-09 19:02:15 -04:00
parent 20df34bb67
commit d9782ac628
3 changed files with 3 additions and 6 deletions

View file

@ -23,7 +23,5 @@
<script src="helper/methods.js"></script>
<script src="helper/ui.js"></script>
<script src="helper/multipleUsers.js"></script>
<script src="frontendTestSpecs.js"></script>
<script src="runner.js"></script>
</html>

View file

@ -149,7 +149,7 @@ $(() => (async () => {
// asynchronous form of require()). In addition, the performance gains would be minimal because
// require-kernel only loads 2 at a time by default. (Increasing the default could cause problems
// because browsers like to limit the number of concurrent fetches.)
for (const spec of window.frontendTestSpecs) {
for (const spec of await $.getJSON('frontendTestSpecs.json')) {
const desc = spec
.replace(/^ep_etherpad-lite\/tests\/frontend\/specs\//, '<core> ')
.replace(/^([^/ ]*)\/static\/tests\/frontend\/specs\//, '<$1> ');