Commit 4ae419ad 4ae419ade75a27d2a6e948de22e08870a6c3cc18 by mickaelandrieu

Added tests

1 parent 527fe8a8
......@@ -27,3 +27,19 @@ casper.test.begin('filters', 3, function(test) {
delete casper.foo;
test.done();
});
casper.test.begin('events order', 2, function(test) {
casper.mowed = "Moo";
casper.on("mow", function() {
this.mowed = casper.mowed + " Moo";
});
casper.emit("mow");
test.assertEquals(casper.mowed, "Moo Moo", "mowed has the correct value");
casper.prependListener("mow", function() {
this.mowed = this.mowed + " Boo";
});
casper.emit("mow");
test.assertEquals(casper.mowed, "Moo Moo Boo Moo", "mowed has the correct value");
test.done();
});
......