Using Karma (with Jasmine)

With Karma, you can test your code while running your application because Karma creates a browser environment for testing. Besides your browser, you can also test your code in other devices, such as phones and tablets.

Jasmine is a behavior-driven development framework for testing the JavaScript code. Being dependency free, Jasmine doesn't require a DOM and is often used together with Karma. We will now proceed to create a new project and test its elements.

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.