Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Example CasperJS test script using a custom assertion on resource requests
require('./casper.intentmedia.js')
test_page = 'http://localhost/test_page.html'
beacon_url = /http:\/\/localhost\/beacon\.html.*/
casper.test.begin "Page fires a beacon request", 1, (test) ->
casper.start 'http://localhost', ->
casper.assertResourceRequestAfterStep beacon_url, ->
casper.open test_page
casper.run ->
test.done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment