Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
128
rated 0 times [  131] [ 3]  / answers: 1 / hits: 88372  / 12 Years ago, fri, august 31, 2012, 12:00:00

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 report that it fired', function() {
spyOn(app, 'report');
app.deviceready();
expect(app.report).toHaveBeenCalledWith('deviceready');
});
});


What I don't understand is:
What exactly does the describe keyword do?



info:

- Its a phonegap application

- We are using the spine.js and jQuery libraries


More From » jquery

 Answers
28

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.


[#83318] Wednesday, August 29, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
travion

Total Points: 137
Total Questions: 96
Total Answers: 103

Location: India
Member since Wed, Aug 4, 2021
3 Years ago
travion questions
Mon, Dec 16, 19, 00:00, 5 Years ago
Sat, Oct 19, 19, 00:00, 5 Years ago
Fri, Sep 20, 19, 00:00, 5 Years ago
Wed, Nov 14, 18, 00:00, 6 Years ago
Sun, Oct 28, 18, 00:00, 6 Years ago
;