Browse files

Add file missing from previous commit.

  • Loading branch information...
1 parent 4ee89bc commit e4ba86ed2d2b83746267183119a96e584d9a8159 @jcoglan jcoglan committed Jul 7, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 spec/phantom.js
View
17 spec/phantom.js
@@ -0,0 +1,17 @@
+// This script should be run with PhantomJS
+// http://www.phantomjs.org/
+
+var page = new WebPage()
+
+page.onConsoleMessage = function(message) {
+ try {
+ var result = JSON.parse(message)
+ if ('total' in result && 'fail' in result) {
+ console.log(message)
+ var status = (!result.fail && !result.error) ? 0 : 1
+ phantom.exit(status)
+ }
+ } catch (e) {}
+}
+
+page.open('spec/browser.html')

0 comments on commit e4ba86e

Please sign in to comment.