4. Jasmine tests
Jasmine is an open source testing framework from Pivotal Labs that uses behaviour-driven notation resulting in a fluent and improved testing experience.
Main concepts:
Suites — describe(string, function) functions, take a title and a function containing one or more specs.
Specs — it(string, function) functions, take a title and a function containing one or more expectations.
Expectations — are assertions that evaluate to true or false. Basic syntax reads expect(actual).toBe(expected)
Matchers — are predefined helpers for common assertions. Eg: toBe(expected), toEqual(expected). Find a complete list here.
Last updated