Coffeescript $state-changing服务的代码覆盖率

Coffeescript $state-changing服务的代码覆盖率,coffeescript,angular-ui-router,karma-jasmine,Coffeescript,Angular Ui Router,Karma Jasmine,我无法为此$state changing服务提供代码覆盖范围: ($state) -> @$inject = ["$state"] -> $state.go "home.about" 这是我的测试,未通过最后两项: mock=需要“mock” 描述“goHomeService”,-> goHomeService=$state=未定义 在每个mock.module“main”之前 在每次mock.inject(_goHomeServi

我无法为此$state changing服务提供代码覆盖范围:

($state) ->
  @$inject = ["$state"]

  -> $state.go "home.about"
这是我的测试,未通过最后两项:

mock=需要“mock”
描述“goHomeService”,->
goHomeService=$state=未定义
在每个mock.module“main”之前
在每次mock.inject(_goHomeService_uu,u$state_uu)之前-->
goHomeService=\u goHomeService_
$state=$state_
它“应该将$state更改为‘home.about’”,>
spy=jasmine.createSpy$状态“开始”
expect($state.current.name).not.toEqual“home.about”
expect($state.go).toEqual jasmine.any函数
goHomeService()
expect($state.current.name).toEqual“home.about”
期待(间谍)收到“家,关于”

是否应更改打字错误?我听不到你想告诉我的