tests: Rename `specs_list` to `frontendTestSpecs`

pull/5050/head
Richard Hansen 2021-04-22 13:18:54 -04:00
parent 1be1b704f1
commit aea2fb7448
3 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ const sanitizePathname = require('../../utils/sanitizePathname');
const settings = require('../../utils/Settings');
exports.expressCreateServer = (hookName, args, cb) => {
args.app.get('/tests/frontend/specs_list.js', async (req, res) => {
args.app.get('/tests/frontend/frontendTestSpecs.js', async (req, res) => {
const [coreTests, pluginTests] = await Promise.all([
exports.getCoreTests(),
exports.getPluginTests(),
@ -26,7 +26,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
console.debug('Sent browser the following test specs:', files);
res.setHeader('content-type', 'application/javascript');
res.end(`var specs_list = ${JSON.stringify(files)};\n`);
res.end(`var frontendTestSpecs = ${JSON.stringify(files)};\n`);
});
const rootTestFolder = path.join(settings.root, 'src/tests/frontend/');

View File

@ -24,6 +24,6 @@
<script src="helper/ui.js"></script>
<script src="helper/multipleUsers.js"></script>
<script src="specs_list.js"></script>
<script src="frontendTestSpecs.js"></script>
<script src="runner.js"></script>
</html>

View File

@ -1,6 +1,6 @@
'use strict';
/* global specs_list */
/* global frontendTestSpecs */
$(() => {
const stringifyException = (exception) => {
@ -144,7 +144,7 @@ $(() => {
require.setGlobalKeyPath('require');
const $body = $('body');
for (const spec of specs_list.map((spec) => encodeURI(spec))) {
for (const spec of frontendTestSpecs.map((spec) => encodeURI(spec))) {
$body.append($('<script>').attr('src', spec.startsWith('/') ? spec : `specs/${spec}`));
}