{"size": 716, "ext": "js", "max_stars_repo_path": "test/acorn.js", "max_stars_repo_name": "ChristopherBruno78/acorn-objj", "max_stars_repo_stars_event_min_datetime": "2016-06-09T12:53:04.000Z", "max_stars_repo_stars_event_max_datetime": "2017-03-21T08:06:43.000Z", "max_issues_repo_path": "test/acorn.js", "max_issues_repo_name": "ChristopherBruno78/acorn-objj", "max_issues_repo_issues_event_min_datetime": "2016-09-13T07:36:15.000Z", "max_issues_repo_issues_event_max_datetime": "2016-09-13T08:59:40.000Z", "max_forks_repo_path": "test/acorn.js", "max_forks_repo_name": "ChristopherBruno78/acorn-objj", "max_forks_repo_forks_event_min_datetime": "2016-09-13T07:38:20.000Z", "max_forks_repo_forks_event_max_datetime": "2019-06-25T17:36:11.000Z"}
{"max_stars_count": 4, "max_issues_count": 1, "max_forks_count": 4, "avg_line_length": 18.358974359, "max_line_length": 52, "alphanum_fraction": 0.5670391061}
"use strict";

const
    driver = require("./acorn/driver.js"),
    expect = require("code").expect,
    parse = require("../lib/parse.js").parse;

require("./acorn/tests.js");

let mode = {},
    stats = mode.stats = { testsRun: 0, failed: 0 };

function report(state, code)
{
    if (state !== "ok")
    {
        ++stats.failed;
        console.log(`"${code}"`);
    }

    ++stats.testsRun;
}

function doParse(source, options)
{
    options.objjOptions = { betterErrors: false };

    return parse(source, options);
}

describe("acorn", () =>
{
    it("all standard acorn tests should pass", () =>
    {
        driver.runTests({ parse: doParse }, report);
        expect(stats.failed).to.equal(0);
    });
});
