LoginSignup
0
0

More than 5 years have passed since last update.

mochaの非同期テストがタイムアウトになる(Error: timeout of xxxxms exceeded.)

Last updated at Posted at 2016-12-02

テストケースが でないと失敗とも判別せず、タイムアウトとして処理されてしまう

タイムアウトった例

テストケースが正でないので、タイムアウト

it('recieve the error of too mush messages', done => {
    client.push(to, messages).catch(err => {
        err.status.should.to.equal(500); // 実際には400が返ってきている
        done();
    });
});

タイムアウトらなかった例

テストケースが正なので、ちゃんと done が動いた?(実装追ってないから分からん)

it('recieve the error of too mush messages', done => {
    client.push(to, messages).catch(err => {
        err.status.should.to.equal(400); // 実際には400が返ってきている
        done();
    });
});
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0