A JS unit test!

Not a lot of code but took a *long* time to figure out :/

This helped:
https://docs.angularjs.org/api/ngMock/function/angular.mock.inject