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.
This commit is contained in:
Tim Abbott
2015-10-13 17:34:50 -04:00
parent a36ac151ef
commit f1074aa491
211 changed files with 26 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
/*jshint strict:false*/
/*global CasperError console phantom require*/
var casper = require("casper").create();
var url = casper.cli.get(0);
var metas = [];
if (!url) {
casper
.echo("Usage: $ casperjs metaextract.js <url>")
.exit(1)
;
}
casper.start(url, function() {
metas = this.evaluate(function() {
var metas = [];
[].forEach.call(document.querySelectorAll("meta"), function(elem) {
var meta = {};
[].slice.call(elem.attributes).forEach(function(attr) {
meta[attr.name] = attr.value;
});
metas.push(meta);
});
return metas;
});
});
casper.run(function() {
require("utils").dump(metas);
this.exit();
});