O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test suites

Following the best practices, you have to separate your tests that are similar to be grouped in suites. For example, in our application, we will write code to manage football matches and information about teams. Both matches and teams are different domains and for that reason, we should group the tests related to the matches in a suite and repeat the same for teams.

Following the example where we created an add function, we might be implementing this function for a Calculator application, so let's use this as an example to understand Jasmine. In the specs folder, create the calculator.spec.js file and write the following code:

describe("Calculator", function() {   ...});

We have created our test suite; for that, we are using the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required