From ab824c728f9c85ad60cea3e7b9138add99b0debc Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 9 May 2021 16:54:58 -0400 Subject: [PATCH] tests: Move slashes to improve readability --- src/node/hooks/express/tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js index ec5fa7b0e..832badcf2 100644 --- a/src/node/hooks/express/tests.js +++ b/src/node/hooks/express/tests.js @@ -55,13 +55,13 @@ exports.expressCreateServer = (hookName, args, cb) => { const getPluginTests = async (callback) => { const moduleDir = 'node_modules/'; - const specPath = '/static/tests/frontend/specs/'; + const specPath = 'static/tests/frontend/specs'; const plugins = await fsp.readdir(moduleDir); const specLists = await Promise.all(plugins.map(async (plugin) => { - const specDir = moduleDir + plugin + specPath; + const specDir = path.join(moduleDir, plugin, specPath); if (!fs.existsSync(specDir)) return []; const specFiles = await fsp.readdir(specDir); - return specFiles.map((spec) => `/static/plugins/${plugin}${specPath}${spec}`); + return specFiles.map((spec) => `/static/plugins/${plugin}/${specPath}/${spec}`); })); return [].concat(...specLists); };