Login from grunt-contrib-jasmine

I am using grunt-contrib-jasmine to run my javascript specs. How to write debug output to the console when starting the specifications, that is, how do I get

console.log("something"); 

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

  $ grunt jasmine --verbose 

But it prints a lot of information that is not interesting to me. How can I just see the output from console.log?

+16
gruntjs jasmine
Feb 20 '13 at 21:32
source share
3 answers

Use console.info instead of console.log

+38
May 24 '13 at 14:59
source share
— -

Not a solution, but a job (sort of). Insert expect("something").toBe(null); This will cause jasmine to write an error message like: Expected 'something' to be null. This way you can look into objects ( expect(element).toBe(null); )

+1
Dec 09 '14 at 15:09
source share

You can also use dump(variable) or console.log(variable) . The source is a great Year of Mu.

0
Aug 05 '14 at 1:06 on
source share



All Articles