O'Reilly logo

Jasmine Cookbook by Munish Sethi

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

Organizing Jasmine specs into groups and subgroups

Whenever code expands and becomes complex, we can segregate and categorize the Jasmine specs corresponding to a specific feature or component. In this recipe, you will learn how to organize Jasmine specs into groups and subgroups. Jasmine provides the describe global function to define group-related specs. The string parameter of the describe function is used to name the collection of specs, which represents a specific feature or component. This helps in finding specs and corresponding JavaScript code in a large suite. The name of the collection of specs is further concatenated with the name(s) of subgroup(s) to make a spec's full name. Moreover, if we name them well, we can read specs as a full ...

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