O'Reilly logo

Mastering JavaScript High Performance by Chad R. Adams

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

Unit testing with Jasmine

Jasmine is a JavaScript unit-testing framework; it allows us to write JavaScript without relying on external libraries such as jQuery. This is helpful for an application that requires a very tiny footprint in memory such as our JavaScript application in iOS, discussed in Chapter 9, Optimizing JavaScript for iOS Hybrid Apps. It also restricts the code to the code we've written, and there's no bug due to a framework in a current build of another vendor's library.

Installation and configuration

Jasmine can be installed in various ways; we can use node package manager or NPM similar to how we structure our Gulp.js build system in Chapter 3, Understanding JavaScript Build Systems. But, to get our feet wet with testing in general, ...

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