当我使用consol.log()进行调试时,我使用Jest框架进行单元测试,如下所示:
it('should create', () => {
console.log(component.selectComponentRef);
expect(component).toBeTruthy();
});
它显示在visual-studio终端中,我想在控制台或其他浏览器中显示console.log()结果,您知道如何实现吗?
答案 0 :(得分:0)
由于Jest独立于浏览器运行(很多人认为这是一种优势),因此您将无法使用Jest在浏览器中看到console.log输出。