December 2015
Intermediate to advanced
240 pages
4h 57m
English
We have seen tests suites in many tools in the previous chapters. In Jasmine, we use describe to start a test suite. describe is a global function, which takes two parameters—a string and a function. The string is the title for the suite and function contains all of the tests implementations. A test in Jasmine is known as spec. The parameter function in the describe function contains one or more specs. A spec is also defined by calling a global function it, which takes two parameters just like describe.
Let's take a look at the following code:
describe("Title of a Suite", function() { // variables available for all specs var amountToConvert; var rateOfConversion; // the function 'it' defines a spec it("Title of a Spec", function() ...Read now
Unlock full access