📌  相关文章
📜  jasmine spyon 类型的参数不能分配给“原型”类型的参数 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:49.331000             🧑  作者: Mango

代码示例1
const service = TestBed.get(GAService);
spyOn(service , "sendException").and.returnValue(Promise.resolve(true));

// do some stuff that is expected to invoke GAService.sendException

expect(service.sendException).toHaveBeenCalled();