Angular unit tests
Luckily enough, this time, we won’t need to install anything since the ASP.NET Core and Angular Visual Studio template that we used to create our WorldCities
project already contains everything we need to write app tests for our Angular application.
More specifically, we can already count on the following packages, which we briefly introduced in Chapter 3, Looking Around:
- Jasmine: A JavaScript testing framework that fully supports the BDD approach that we talked about earlier
- Karma: A tool that lets us spawn browsers and run our Jasmine tests inside them (and show their results) from the command line
- Protractor: An end-to-end test framework that runs tests against Angular applications from within a real browser, interacting with it as if it were a real user
For additional information, check out the following guides:
Karma: https://karma-runner.github.io/
Jasmine: https://jasmine.github.io/
Protractor...