Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

ui-router not working while unit testing #29

@doshimehul

Description

@doshimehul

Hi Thanks for the seed project. I have setup a project basedon the steps and it works great!

However I am facing issue while trying to setup unit test case with ui-router.

var module = angular.module('moduleAddonControllers', []);
module.controller('TestaddonAddCtrl',['$scope','$state', function ($scope,$parse) {

$scope.mode = "add";
$state.go();

}
]);

When controller is having reference of '$state' my unit test case if failing with following error message!
"Error: [$injector:unpr] Unknown provider: $stateProvider <- $state"

My guess is *Spec.js are included before the ui-router causing the above issue. Kindly let me know how we can get around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions