The 'describe' keyword in javascript

后端 未结 3 1598
情歌与酒
情歌与酒 2021-01-30 10:08

So I am a newbie in javascript and i had been going through some one else\'s code and I found this..

describe(\'deviceready\', function() {
    it(\'should rep         


        
相关标签:
3条回答
  • 2021-01-30 10:39

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

    0 讨论(0)
  • 2021-01-30 10:55

    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.

    0 讨论(0)
  • 2021-01-30 10:59

    "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

    0 讨论(0)
提交回复
热议问题