AngularJS Jasmine Test Fails: Failed to instantiate module

前端 未结 1 1874
旧巷少年郎
旧巷少年郎 2021-02-12 08:15

My angular app worked great and so did my tests, using karma and jasmine, until I added a dependency in ui.bootstrap. Now the app still works as expected, but I can

1条回答
  •  梦如初夏
    2021-02-12 09:01

    In karma.conf.js there is a list of files that karma loads before test execution:

    // list of files / patterns to load in the browser
    files: [
      'bower_components/angular/angular.js',
      'bower_components/angular-mocks/angular-mocks.js',
      ...
    ]
    

    Add bootstrap-ui.js there.

    0 讨论(0)
提交回复
热议问题