1

I am using this lib to create my jasmine test https://github.com/gruntjs/grunt-contrib-jasmine I have the test framework running without problem but when it print out things in console, it contains too much junk info that I do not want, is there anyway to output the test result into a log file?

In my gruntfile.js, I have

grunt.registerTask('test', ['jasmine']);

Is there anyway when we run grunt test , it output all result into log.txt something like this?

sefirosu
  • 2,558
  • 7
  • 44
  • 69

1 Answers1

1

You could use task specific logs with logfile-grunt to capture all output from jasmine:

https://github.com/brutaldev/logfile-grunt

Or just pipe the output directly to a file:

grunt test > log.txt

Or if you'd just like to reduce the output from jasmine you can use the display:short option

jasmine : {
    //your config
    options : {
        display : 'short'
    }
}
Revive
  • 2,248
  • 1
  • 16
  • 23