【发布时间】:2016-10-06 11:53:42
【问题描述】:
我不知道为什么,但是当我为我的 AngularJS 应用程序运行新的 Karma 测试时,我会从我的测试文件的先前版本中获得输出。我是 Karma 测试的新手,所以我确定我在某处遗漏了一些东西。
PhantomJS 2.1.1 (Windows 7 0.0.0) Calendar Constructor 实例化带有年、月和选项的日历 FAILED (这是我之前为此测试设置的输出)
当我的测试文件看起来像这样时,我不知道如何获得上述输出。
test.js
'use strict';
describe('holidays', function () {
var scope, controller;
beforeEach(function(){
module('holiday');
});
describe('HolidaysController', function(){
beforeEach(inject(function($rootScope, $controller){
scope = $rootScope;
controller = $controller('HolidaysController', {
'vm': scope
});
}));
it('should work', function(){
expect(vm.tooltips).toBe(false);
});
});
});
- Angular 版本:1.4.0
- 业力版本:0.13.22
- PhantomJS 版本: 2.1.1
【问题讨论】:
标签: angularjs phantomjs karma-runner karma-jasmine