Why isn't $injector finding $state in my unit test?
问题 The following is my module and unit test set-up. When I try to set $ state , $injector.get("$state") throws the always fun Unknown provider: $stateProvider <- $state error and I don't understand why. angular.module("my-module", [ //Third Party "ui.bootstrap", "ui.router", "toaster", "angular-loading-bar", "ngAnimate", "ngSanitize", "ApplicationInsightsModule", "pascalprecht.translate" ]); describe("something descriptive and helpful", (): void => { // a bunch of other service variables.... var