Jasmine:测试扩展角度指令

时间:2014-02-24 23:41:05

标签: angularjs angularjs-directive jasmine angular-ui angular-ui-bootstrap

我正在扩展ui-bootstrap-carousel。为了使我的测试工作,必须执行原始的carousel指令。这在应用程序中工作(通过myDirective.priority:-1)。但是,似乎原始指令没有在我的测试中运行。

// console.log( iElement ) output:
{0: <div data-carousel="" data-interval="interval" class="ng-scope"></div>, length: 1}

在我的测试中,我使用ui-bootstrap-carousel进行设置,如下所示:

'use strict';

describe('Directive: Carousel', function () {

  beforeEach(module('myApp','ui.bootstrap.carousel'));

我找不到任何关于测试多个指令的文档或任何依赖于指令的文档。

我已经确保karma.config有正确的ui.bootstrap.carousel路径,并且Karma不会吐出任何错误,除了我的测试失败(因为bootstrap carousel没有执行)。

0 个答案:

没有答案