我正在尝试使用Karma执行单元测试。根据文档,我已经完成了所有工作。当我编写测试的这部分后,它从不会调用最后两个函数。单元测试与Karma不调用函数
it('should create the mock object', function (done) {
service.createObj(mockObj)
.then(test)
.catch(failTest)
.finally(done);
});
var test = function() {
expect(2).toEqual(1);
};
var failTest = function(error) {
expect(2).toEqual(1);
};
在控制台中的任何错误? –