Error: [$injector:unpr] Unknown provider: $stateProvider <- $state
You haven't loaded any module, so no service at all is available. Add this before your beforeEach:
beforeEach(module('ui.router'));
You haven't loaded any module, so no service at all is available. Add this before your beforeEach:
beforeEach(module('ui.router'));