0
我需要测试来自路由功能的正确响应。摩卡测试express.js应用http请求
在https://github.com/visionmedia/express/blob/master/test/app.router.js 我看到代码:
app.get('/:name', function(req, res, next){
res.send(req.params.name);
});
request(app)
.get('/foo%2Fbar')
.expect('foo/bar', done);
我不知道什么是请求(应用程序)我怎么能包括它?
非常感谢你) – WHITECOLOR