摩卡测试正在过去,但不可能

时间:2015-07-08 04:03:57

标签: node.js mocha

此测试应该会失败,因为我还没有让端点启动并运行我的请求正在尝试呼叫。但测试运行绿色。我是摩卡的新手,所以想知道我在这里做错了什么。我是BDD / TDDing我的API。

  describe('Then: we receive a successful response', function(){
        it('status code should be 200', function (done){
            let response = yield request.get(url).end();

            expect(response).to.have.status(200);

            done();
        });
    });

0 个答案:

没有答案