Logging from grunt-contrib-jasmine

后端 未结 3 1579
悲&欢浪女
悲&欢浪女 2021-01-17 08:55

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(\"so         


        
相关标签:
3条回答
  • 2021-01-17 09:26

    Use console.info instead of console.log

    0 讨论(0)
  • 2021-01-17 09:31

    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);)

    0 讨论(0)
  • 2021-01-17 09:33

    You can also use dump(variable) or console.log(variable). Source is the excellent Year of Moo.

    0 讨论(0)
提交回复
热议问题