summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2012-11-17 07:31:03 -0800
committerJohn McLear <john@mclear.co.uk>2012-11-17 07:31:03 -0800
commit73eafb92c27c57a5936ec241a228657e16aa06b7 (patch)
treeba9b32b96b38f52aa68ce2127740d7a3d37b5882 /src/node
parent5009ab117421521d5d12ba288af56c78af7871c7 (diff)
parentff0c9bb4a0c3c814c5f6373a38025b22fab26414 (diff)
downloadetherpad-lite-73eafb92c27c57a5936ec241a228657e16aa06b7.zip
Merge pull request #1178 from marcelklehr/fix/tests
Fix/tests
Diffstat (limited to 'src/node')
-rw-r--r--src/node/hooks/express/tests.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js
index 7921da5a..94cd5fb6 100644
--- a/src/node/hooks/express/tests.js
+++ b/src/node/hooks/express/tests.js
@@ -1,5 +1,6 @@
-var path = require("path");
-var fs = require("fs");
+var path = require("path")
+ , npm = require("npm")
+ , fs = require("fs");
exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/tests/frontend/specs_list.js', function(req, res){
@@ -17,7 +18,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
}
subPath = subPath.split("?")[0];
- var filePath = path.normalize(__dirname + "/../../../../tests/frontend/")
+ var filePath = path.normalize(npm.root + "/../tests/frontend/")
filePath += subPath.replace("..", "");
return filePath;
}