mocha with nodejs assert hangs/timeouts for assert(false) instead of error

前端 未结 3 1804
醉梦人生
醉梦人生 2021-01-17 20:56

I have this kind of a mocha test:

describe \'sabah\', →
    beforeEach →
        @sabahStrategy = _.filter(@strats, { name: \'sabah2\' })[0]
            .str         


        
3条回答
  •  伪装坚强ぢ
    2021-01-17 21:54

    For anyone with same issue: You should make sure that done() gets called even after an assert fails, like in the following code:

    try {
      // your asserts go here
      done();
    } catch (e) {
      done(e);
    }
    

提交回复
热议问题