1 /* eslint-env phantomjs, qunit */
5 var obj = require(path);
7 global[key] = obj[key];
12 var alert = console.log;
13 var QUnit = load('qunit');
17 QUnit.log(function(details) {
18 if (!details.result) {
19 failures.push(details);
22 QUnit.done(function(details) {
23 details.failures = failures;
24 alert(JSON.stringify(details));
29 if (typeof phantom === 'undefined') {
30 load('./src/htmlminifier');
31 require(process.argv[2]);
35 var system = require('system');
36 setTimeout(function() {
37 system.stderr.write('timed out');
40 var page = require('webpage').create();
41 page.onAlert = function(details) {
45 page.open(system.args[1], function(status) {
46 if (status !== 'success') {