Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging from grunt-contrib-jasmine

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 ?

like image 247
opsb Avatar asked Feb 20 '13 21:02

opsb


2 Answers

Use console.info instead of console.log

like image 138
badsyntax Avatar answered Oct 27 '22 07:10

badsyntax


Not a solution but a work around (sort of). Put in a expect("something").toBe(null); This will make jasmine to write out an error message like: Expected 'something' to be null. This way you can peek into objects (expect(element).toBe(null);)

like image 2
Don Kartacs Avatar answered Oct 27 '22 06:10

Don Kartacs