我正在使用 superagent-bluebird-promise,下面给出了 404 错误,“无法获取 /v1/result”。当我通过邮递员调用它时,已经确认它有效。我究竟做错了什么?
it('should return a result', function(done){
stub.login(userId);
request.get('http://localhost:8080/v1/result/')
.then(function(res) {
console.log(res);
expect(res.body).to.have.lengthOf(1);
}, function(error) {
console.log(error);
expect(error).to.not.exist;
})
.finally(function(){
stub.logout();
done();
});
});