Skip to content

Commit

Permalink
Reset the onLoadFinished handler after the first page is loaded to av…
Browse files Browse the repository at this point in the history
…oid cases where the page uses iframes which also trigger the callback
  • Loading branch information
obrie committed Dec 14, 2011
1 parent d492dd2 commit 4302944
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/guard/jasmine/phantomjs/run-jasmine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ page.onInitialized = ->
# Open web page and run the Jasmine test runner
#
page.open url, (status) ->
page.onLoadFinished = ->
if status isnt 'success'
console.log JSON.stringify({ error: "Unable to access Jasmine specs at #{ url }" })
phantom.exit()
Expand Down

0 comments on commit 4302944

Please sign in to comment.