21
This is Jasmine unit testing framework syntax for unit tests. Angular uses, promotes and encourages unit testing practices.
Testability is taken very seriously in AngularJS and the authors of the framework make sure that code written using AngularJS is easy to test:
AngularJS has also a solution for higher-level, end-to-end testing. E2e tests use a very similar syntax (so you will also notice the expect
keyword) but those are not Jasmine tests. More info can be found here: https://stackoverflow.com/a/13213262/1418796