mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 08:56:17 -04:00
Setted up an enviroment for frontend tests, first steps
This commit is contained in:
parent
3578e36616
commit
ba4ebbba3b
9 changed files with 6501 additions and 0 deletions
15
src/node/hooks/express/tests.js
Normal file
15
src/node/hooks/express/tests.js
Normal 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);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue