0
我创建了一个简单的JS 功能我想测试,但是当我运行它显示已被称为我在做什么错错误预计间谍日志?预计间谍日志
功能
function helloWorld() {
console.log('hey');
}
测试规范
describe('Hello world', function() {
it('says hello', function() {
spyOn(console,'log').and.callThrough();
expect(console.log).toHaveBeenCalled();
});
});