从grunt-contrib-jasmine记录 [英] Logging from grunt-contrib-jasmine

查看:118
本文介绍了从grunt-contrib-jasmine记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用grunt-contrib-jasmine来运行我的javascript规范。如何在运行规范时将调试输出写入控制台,即如何获得

  console.log(something); 

在控制台中显示输出结果?我发现我可以通过运行得到输出:

  $ grunt jasmine --verbose 

但是这会打印出很多我不感兴趣的信息。我怎么才能看到console.log的输出?

解决方案使用 console.info 而不是 console.log


I'm using grunt-contrib-jasmine to run my javascript specs. How do I write debug output to the console when running specs i.e. how do I get

console.log("something");

to show output in the console? I do find that I can get output by running:

 $ grunt jasmine --verbose

But this prints a lot of information that I'm not interested in. How can I just see the output from console.log ?

解决方案

Use console.info instead of console.log

这篇关于从grunt-contrib-jasmine记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆