<commit_before>var system = require("system"); // jshint ignore:line
var page = require("webpage").create();

var url = system.args[1];

page.onConsoleMessage = function (message) {
    console.log(message);
};

function exit(code) {
    setTimeout(function(){ phantom.exit(code); }, 0);
    phantom.onError = function(){};
}

console.log("Loading URL: " + url);

page.open(url, function (status) {
    if (status != "success") {
        console.log("Failed to open " + url);
        phantom.exit(1);
    }

    console.log("Running test.");

    var failures = page.evaluate(function() {
        test.test_runner.runner();
        return window["test-failures"];
    });
<commit_msg>PLD: ignore js error, remove unneeded kw args<commit_after>var system = require("system"); // jshint ignore:line
var page = require("webpage").create();

var url = system.args[1];

page.onConsoleMessage = function (message) {
    console.log(message);
};

function exit(code) {
    setTimeout(function(){ phantom.exit(code); }, 0);
    phantom.onError = function(){};
}

console.log("Loading URL: " + url);

page.open(url, function (status) {
    if (status != "success") {
        console.log("Failed to open " + url);
        phantom.exit(1);
    }

    console.log("Running test.");

    var failures = page.evaluate(function() {
        test.test_runner.runner(); // jshint ignore:line
        return window["test-failures"];
    });

{'fraction_non_alphanumeric': 0.17229254571026723, 'fraction_numerical': 0.004219409282700422, 'mean_word_length': 3.4055727554179565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5590330', 'n_tokens_mistral': 454, 'n_tokens_neox': 434, 'n_words': 97}