2014
tutsplus
Dan Wellman
1h 48m
English
In this course we'll learn all about Jasmine, the unit test framework for JavaScript. We'll cover how to set up Jasmine to be used with Grunt and Node.js so that we can run the unit tests automatically as part of a build process, and we'll delve into all of the different features that the framework has to offer. Starting with the structure of our test files, through to mocking dependencies, using asynchronous specs, adding plugins for things like jQuery and working with RequireJS modules.
1. Introduction
Introduction
Setup
2.Jasmine Basics
Defining Test Suites With the Describe Method
Creating Test Cases With the 'it' Method
The 'Expect' Method
Set-Up and Tear-Down
Getting Coverage Results
3.Mocking
Mocking Dependencies With Spies
Spy Methods
The 'Calls' Tracking Property
Additional Methods of the 'Calls' Property
Creating Custom Matchers
4.Advanced Testing With Jasmine
Using Jasmine's Clock
Asynchronous Specs
5.Conclusion
Conclusion
Download File Size:165.69 MB