What is “assert” in JavaScript?

后端 未结 14 733
-上瘾入骨i
-上瘾入骨i 2020-12-04 05:03

What does assert mean in JavaScript?

I’ve seen something like:

assert(function1() && function2() && function3(), \"some          


        
14条回答
  •  生来不讨喜
    2020-12-04 05:12

    It probably came with a testing library that some of your code is using. Here's an example of one (chances are it's not the same library as your code is using, but it shows the general idea):

    http://chaijs.com/guide/styles/#assert

提交回复
热议问题