This is Google's cache of http://www.softwaretestingmagazine.com/knowledge/javascript-unit-testing-with-jasmine/. It is a snapshot of the page as it appeared on 23 Aug 2018 10:50:12 GMT. The current page could have changed in the meantime. Learn more.
These search terms are highlighted:yoursiteyoucanalsoframework
Full versionText-only versionView source
Tip: To quickly find your search term on this page, press Ctrl+F or ⌘-F (Mac) and use the find bar.
JavaScript Unit Testing with Jasmine

JavaScript Unit Testing with Jasmine

Unit testing JavaScript applications can seem difficult. Issues arise with JavaScript scope, asynchronous XHR requests, DOM manipulation, and all the different browsers and platforms. Sometimes, JavaScript unit testing seems unreliable, brittle, or take more time and effort than it’s worth. The good news is that dozens of JavaScript test frameworks, libraries, and test runners help solve the problems. These make implementing unit tests for your JavaScript applications quick, reliable, and easy to maintain.

The bad news is, there are dozens of JavaScript frameworks, libraries, and test runners to choose from. Selecting a JavaScript test framework can be daunting. This article discusses the basics for writing JavaScript unit tests, the concepts behind test-driven development (TDD) and behavior-driven development (BDD). You will be able to apply that information to writing and running JavaScript unit tests with Jasmine. Jasmine is a behavior-driven development framework for testing your JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.

Related Content: