Angular Unit Tests
See John Papa’s AngularJS Testing Examples. You can download the
codebase and try out tests. If you want to start a new codebase that utilizes this testing strategy, you can use
Angular Hot Towel to scaffold a new project for you. Keep in mind that
you probably not need the
src/server folder nor the separate
src/client folder in the generated codebase
src/client/app folder in the example codebase, you will find several component folders.
In those component folders, you will find
spec.js files for tests of controllers, route definitions, and services.
For examples from an ES2015 code base, refer to the NG6 codebase.
client/app/components/ folders, you will find examples of tests.
Refer to the Angular Style Guide for general information on testing in Angular.
There is also a Pluralsight Course on Angular Testing.