<commit_before>// LICENSE : MIT
"use strict";
/*
    reftest-runner treat a single test.
    passing targetSet, then return result.
 */
import ContentRunner from "./runner/content-runner"
import webdriver from "selenium-webdriver"
import BlinkDiff from "blink-diff"
import Promise from "bluebird"
import path from "path"
import dateFormat from 'dateformat'
import pathUtil from "./utils/path-utils.js"
import mkdirp from "mkdirp"
import ObjectAssign from "object-assign"
import defaultOptions from "./options/default-options"

/**
 * @constructor
 */
export default class ReftestRunner {
    /**
     *
     * @param {IReftestOption} options
     */
    constructor(options) {
        this.options = ObjectAssign(defaultOptions, options);
    }

    _openDriver() {
        var options = webdriver.Capabilities.phantomjs();
        return new webdriver.Builder()
            .withCapabilities(options)
            .build();
    }

    _closeDriver(driver) {
        driver.quit();
    }

    /**
     *
     * @param URL
     * @returns {Promise.<T>}
     * @private
     */
    _runTestURL(URL) {
        var driver = this._openDriver();
        var contentRunner = new ContentRunner(driver);<commit_msg>fix(lib): fix merging options<commit_after>// LICENSE : MIT
"use strict";
/*
    reftest-runner treat a single test.
    passing targetSet, then return result.
 */
import ContentRunner from "./runner/content-runner"
import webdriver from "selenium-webdriver"
import BlinkDiff from "blink-diff"
import Promise from "bluebird"
import path from "path"
import dateFormat from 'dateformat'
import pathUtil from "./utils/path-utils.js"
import mkdirp from "mkdirp"
import ObjectAssign from "object-assign"
import defaultOptions from "./options/default-options"

/**
 * @constructor
 */
export default class ReftestRunner {
    /**
     *
     * @param {IReftestOption} options
     */
    constructor(options) {
        this.options = ObjectAssign(options, defaultOptions);
    }

    _openDriver() {
        var options = webdriver.Capabilities.phantomjs();
        return new webdriver.Builder()
            .withCapabilities(options)
            .build();
    }

    _closeDriver(driver) {
        driver.quit();
    }

    /**
     *
     * @param URL
     * @returns {Promise.<T>}
     * @private
     */
    _runTestURL(URL) {
        var driver = this._openDriver();
        var contentRunner = new ContentRunner(driver);
{'fraction_non_alphanumeric': 0.11500412201154163, 'fraction_numerical': 0.0, 'mean_word_length': 2.7803738317757007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4188569', 'n_tokens_mistral': 704, 'n_tokens_neox': 690, 'n_words': 184}