Skip to content
Browse files

Add safe disabling for non webkit browsers. How test this? Don't know…

…... Need some ideas for this.
  • Loading branch information...
1 parent 5b4646f commit 68d58aa8a665463996165ce39762a8c4cc56e59b @demiazz committed Jan 29, 2012
Showing with 14 additions and 9 deletions.
  1. +14 −9 lib/reporter.coffee
View
23 lib/reporter.coffee
@@ -75,15 +75,20 @@ class jasmine.WebkitReporter extends jasmine.Reporter
@param {Object|null} options - options for reporter
###
constructor: (options = {}) ->
- if options
- @title = options.title if options.title
- @replaceId = options.replaceId if options.replaceId
- @timeout = options.timeout if options.timeout
- @passedIcon = options.passedIcon if options.passedIcon
- @failedIcon = options.failedIcon if options.failedIcon
- @runningIcon = options.runningIcon if options.runningIcon
- @startedAt = null
- @finishedAt = null
+ if jasmine.getGlobal().webkitNotifications
+ if options
+ @title = options.title if options.title
+ @replaceId = options.replaceId if options.replaceId
+ @timeout = options.timeout if options.timeout
+ @passedIcon = options.passedIcon if options.passedIcon
+ @failedIcon = options.failedIcon if options.failedIcon
+ @runningIcon = options.runningIcon if options.runningIcon
+ @startedAt = null
+ @finishedAt = null
+ else
+ # safe stubing functions for reporting by empty methods
+ @reportRunnerStarting = () ->
+ @reportRunnerResults = () ->
return
###

0 comments on commit 68d58aa

Please sign in to comment.
Something went wrong with that request. Please try again.