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
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, -> test_page ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment