3

So I've got grunt-contrib-jasmine running specs in PhantomJS. Is there a way to configure it so it always outputs _specRunner.html (to be run in a browser) instead of only upon errors?

I see this in the doc, but how do I configure this flag?

Flags

Name: build

Turn on this flag in order to build a SpecRunner html file. This is useful when troubleshooting templates, running in a browser, or as part of a watch chain e.g.

watch: {
  pivotal : {
    files: ['src/**/*.js', 'specs/**/*.js'],
    tasks: 'jasmine:pivotal:build'
  }
}
FlavorScape
  • 13,301
  • 12
  • 75
  • 117
  • You can use grunt jasmine -build, but is there a way to configure the jasmine node to always build it? And unfortunately it hangs there "running the specs" in phantom – FlavorScape May 30 '14 at 00:20

1 Answers1

5

I found the answer. Use options.keepRunner in your jasmine config. This will keep jasmine from deleting the _specRunner.html file after the tests exit.

 jasmine: {    
          options: {
              keepRunner: true,
              ...
FlavorScape
  • 13,301
  • 12
  • 75
  • 117