tests: Unexport unnecessarily exported functions

This commit is contained in:
Richard Hansen 2021-05-07 17:55:00 -04:00
parent ed44449639
commit 0852df74f1

View file

@ -8,10 +8,7 @@ const settings = require('../../utils/Settings');
exports.expressCreateServer = (hookName, args, cb) => { exports.expressCreateServer = (hookName, args, cb) => {
args.app.get('/tests/frontend/frontendTestSpecs.js', async (req, res) => { args.app.get('/tests/frontend/frontendTestSpecs.js', async (req, res) => {
const [coreTests, pluginTests] = await Promise.all([ const [coreTests, pluginTests] = await Promise.all([getCoreTests(), getPluginTests()]);
exports.getCoreTests(),
exports.getPluginTests(),
]);
// merge the two sets of results // merge the two sets of results
let files = [].concat(coreTests, pluginTests).sort(); let files = [].concat(coreTests, pluginTests).sort();
@ -56,7 +53,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
return cb(); return cb();
}; };
exports.getPluginTests = async (callback) => { const getPluginTests = async (callback) => {
const moduleDir = 'node_modules/'; const moduleDir = 'node_modules/';
const specPath = '/static/tests/frontend/specs/'; const specPath = '/static/tests/frontend/specs/';
const staticDir = '/static/plugins/'; const staticDir = '/static/plugins/';
@ -76,4 +73,4 @@ exports.getPluginTests = async (callback) => {
return pluginSpecs; return pluginSpecs;
}; };
exports.getCoreTests = async () => await fsp.readdir('src/tests/frontend/specs'); const getCoreTests = async () => await fsp.readdir('src/tests/frontend/specs');