We use CasperJS in our continuous integration system to check non-regressions.

The Tester module contains a lot of pre-packaged functions, but sometime you want to test some things that is not packaged into CasperJS.

The solution is very simple: you just have to extends the tester module prototype !

Imagine you want to assert that the canonical url of your current page is the one you want, you just have to do this:

 

That’s all !