Skip to content

Instantly share code, notes, and snippets.

@ralphcrisostomo
Created January 6, 2014 04:30
Show Gist options
  • Save ralphcrisostomo/8278278 to your computer and use it in GitHub Desktop.
Save ralphcrisostomo/8278278 to your computer and use it in GitHub Desktop.
grunt task jasmine server
# ----------
# Jasmine Server
# ----------
grunt.registerTask 'jasmine-server', 'start web server for jasmine tests in browser', ->
grunt.task.run 'jasmine:tests:build'
grunt.event.once 'connect.tests.listening', (host,port) ->
specRunnerUrl = 'http://' + host + ':' + port + '/_SpecRunner.html'
grunt.log.writeln 'Jasmine specs available at: ' + specRunnerUrl
require('open')(specRunnerUrl)
grunt.task.run 'connect:tests:keepalive'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment