Commit b1b5d0e4 b1b5d0e47bcd0e6061037f9d6083c5546614137b by Nicolas Perriault

added more tests for events

1 parent f7ca4ea2
// events
casper.test.comment("events");
casper.plopped = false;
casper.on("plop", function() {
this.plopped = true;
});
casper.test.assert(Object.keys(casper._events).some(function(i) {
return i === "plop";
}), "on() has set an event handler");
casper.emit("plop");
casper.test.assert(casper.plopped, "emit() emits an event");
// filters
casper.test.comment("filters");
casper.foo = 0;
casper.setFilter("test", function(a) {
this.foo = 42;
......