Files
zulip/frontend_tests/casperjs/samples/customevents.js
Tim Abbott f1074aa491 Move frontend tests out of zerver/tests/.
This fixes an unfortunate bug where the backend tests in
zerver/tests.py were not being run automatically, and also makes these
a bit easier to find.
2015-10-28 10:11:47 -07:00

17 lines
390 B
JavaScript

/*jshint strict:false*/
/*global CasperError console phantom require*/
var casper = require("casper").create();
// listening to a custom event
casper.on("google.loaded", function(title) {
this.echo("Google page title is " + title);
});
casper.start("http://google.com/", function() {
// emitting a custom event
this.emit("google.loaded", this.getTitle());
});
casper.run();