From 43029444902904c517b299acfad09f30a10246cd Mon Sep 17 00:00:00 2001 From: Aaron Pfeifer Date: Wed, 14 Dec 2011 17:46:10 -0500 Subject: [PATCH] Reset the onLoadFinished handler after the first page is loaded to avoid cases where the page uses iframes which also trigger the callback --- lib/guard/jasmine/phantomjs/run-jasmine.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/guard/jasmine/phantomjs/run-jasmine.coffee b/lib/guard/jasmine/phantomjs/run-jasmine.coffee index 4007ed3..37087f0 100644 --- a/lib/guard/jasmine/phantomjs/run-jasmine.coffee +++ b/lib/guard/jasmine/phantomjs/run-jasmine.coffee @@ -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()