Setted up an enviroment for frontend tests, first steps

This commit is contained in:
Peter 'Pita' Martischka 2012-10-02 00:35:43 +01:00
parent 3578e36616
commit ba4ebbba3b
9 changed files with 6501 additions and 0 deletions

View file

@ -0,0 +1,15 @@
var path = require("path");
exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/tests/frontend/*', function (req, res) {
var subPath = req.url.substr("/tests/frontend".length);
if (subPath == ""){
subPath = "index.html"
}
var filePath = path.normalize(__dirname + "/../../../../tests/frontend/")
filePath += subPath.replace("..", "");
res.sendfile(filePath);
});
}