How to assert not null?

后端 未结 3 1916
一向
一向 2021-02-11 12:53

I\'m very new in javascript testing, I would like to know how to assert not null in Mocha framework.

3条回答
  •  花落未央
    2021-02-11 13:41

    In case, you're using Chai in addition to Mocha:

    assert.isNotNull(tea, 'great, time for tea!');
    

提交回复
热议问题