Issue with angular.mock.inject method

前端 未结 2 2079
盖世英雄少女心
盖世英雄少女心 2021-01-07 11:01

I am using folloing jasmine test case

\'use strict\';

describe(\'companyService\', function() {

    var $httpBackend, companyService;

    beforeEach(angu         


        
2条回答
  •  既然无缘
    2021-01-07 11:27

    You should update the "karma-chrome-launcher" and "karma-firefox-launcher" in node_module. This may be solve the issue.

    npm install karma-chrome-launcher

    npm install karma-firefox-launcher

    If you think the issue because of "angular.mock.inject " then one can use inject function.

    But I think your unit test script is not getting chance for loading and execution.So,this will not reason for above error.

    Thanks.

提交回复
热议问题