The 'describe' keyword in javascript

孤街醉人 提交于 2019-12-02 17:15:00
mmigdol

Describe is a function in the Jasmine testing framework. It simply describes the suite of test cases enumerated by the "it" functions.

Also used in the mochajs framework.

yngccc

Describe is not part of Javascript, it is a function defined in the library you used (namely Jasmine)

"A test suite begins with a call to the global Jasmine function describe with two parameters: a string and a function. The string is a name or title for a spec suite - usually what is being tested. The function is a block of code that implements the suite."

source: http://jasmine.github.io/2.0/introduction.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!