n1k0/casperjs — Issue #57: Added context to emitted test events
Author: cwinters
Created: 2012-02-22 17:15:23+00:00
State: open

(originally reported on the google group: http://groups.google.com/group/casperjs/browse_thread/thread/4dc3aa408e1d8157)

To enable other test reporters (like TAP) and to provide a platform for others to layer on functionality, provided added context to the events emitted by Casper.test. This includes:

* changing the 'type' to the specific assertion you're using -- for example, assertEvalEquals() just invokes assertEquals() and has the same 'type'; event listeners may be interested in the original assertion type so they can collect additional information for debugging, take a screenshot, etc
* provide the current file being executed as well as the current test case if available (see https://github.com/n1k0/casperjs/issues/56)