From 8b8cf0178521739b0de1e29da5102f97ca93af27 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 3 Feb 2013 13:53:44 +0000 Subject: [PATCH] put tests in static folder, still have a race condition no biggy --- 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 9aeaefe6..988c3c0c 100644 --- a/src/node/hooks/express/tests.js +++ b/src/node/hooks/express/tests.js @@ -8,9 +8,9 @@ exports.expressCreateServer = function (hook_name, args, cb) { fs.readdir('node_modules', function(err, plugins){ // installed plugins plugins.forEach(function(plugin){ // for each one - if(fs.existsSync("node_modules/"+plugin+"/tests/frontend/specs")){ // If the folder exists - fs.readdir("node_modules/"+plugin+"/tests/frontend/specs/", function(err, pluginFiles){ - files.push("/static/plugins/"+plugin+"/tests/frontend/specs/"+pluginFiles); + if(fs.existsSync("node_modules/"+plugin+"/static/tests/frontend/specs")){ // If the folder exists + fs.readdir("node_modules/"+plugin+"/static/tests/frontend/specs/", function(err, pluginFiles){ + files.push("/static/plugins/"+plugin+"/static/tests/frontend/specs/"+pluginFiles); }); } });