How to assert not null?

后端 未结 3 1914
一向
一向 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:24

    This is what worked for me (using Expect library with Mocha):

    expect(myObject).toExist('Too bad when it does not.');
    

提交回复
热议问题