summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-11-17 16:28:54 +0100
committerMarcel Klehr <mklehr@gmx.net>2012-11-17 16:28:54 +0100
commit364e6928b566f5a1c1384a9e0c8ef0d95fdf43f5 (patch)
tree8c7a3386f039071627b37afe3aaa460257813702
parentfaeee3e09a310ffffd1de06419138bc72815ca8c (diff)
downloadetherpad-lite-364e6928b566f5a1c1384a9e0c8ef0d95fdf43f5.zip
Make tests work on windows
-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;
}