摩卡测试运行两次 - 失败两次

时间:2017-05-19 10:46:45

标签: javascript ecmascript-6 promise mocha

我有一个应该失败的摩卡测试,但是在终端中它会相继运行两次。

describe('MySQL is functional', () => {
    //Check that the heathcheck is reporting
    it('indicates MySQL is running', done => {
        Request.get(healthcheckUrl, (err, res, body) => {
            //Decode the JSON
            let json = JSON.parse(body);

            assert.isOk(json.mysql === 'OK');
        }).then(err => done(err));
    });

});

Request.get使用Request promise库返回一个promise。

终端输出:

1) indicates MySQL is running
2) indicates MySQL is running

如果您需要更多信息,请告诉我们。

0 个答案:

没有答案