mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
tests: Unexport unnecessarily exported functions
This commit is contained in:
parent
ed44449639
commit
0852df74f1
1 changed files with 3 additions and 6 deletions
|
@ -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');
|
||||||
|
|
Loading…
Reference in a new issue