How to assert not null?

后端 未结 3 1158
[愿得一人]
[愿得一人] 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:18

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

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

提交回复
热议问题