【发布时间】:2016-09-02 16:22:39
【问题描述】:
当我使用下面的代码时,显示的错误 expect is not defined(在 then 内部)
文档link
it("should return error", function () {
return request(app).get("/verify")
.expect(200)
.then(function (res) {
return expect(res.body.error[0].message).to.equal("NEW_CODE_REQUIRED");
});
});
如何检查?
【问题讨论】:
标签: node.js mongoose supertest-as-promised