0
我试图在Karma运行一些茉莉花测试,但测试失败,因为它说它运行0测试0。有人能告诉我我做错了什么吗?噶玛+茉莉花报告0测试运行时,有测试
异步请求模拟触发并触发回调。即使当我去调试器,它说2个测试在调试器中完成,但在控制台失败。是什么赋予了?
describe('User Info Tests:', function() {
describe('Fetch User Info:', function() {
it("User Name should match", function(done) {
// mock async request
getUserProfile(1, 2, function (userProfile) {
var match = userProfile.displayName === 'Unit Test User';
expect(match).toBeTruthy();
done();
}, function (msg) {
done();
throw msg;
});
});
});
});
请参阅下面的运行测试的调试控制台的截图。您将看到测试运行状态为SUCCESS。