<commit_before>import { FuseAPI } from "./lib/FuseApi";
export class BundleTestRunner {
    public fuse: FuseAPI;
    public reporter: string;
    public opts: any;
    constructor(public bundle: any, opts?: any) {
        this.opts = opts || {};
        this.reporter = opts.reporter || "fuse-test-reporter";
        this.fuse = bundle.FuseBox;
    }

    public start() {
        const FuseBoxTestRunner = this.fuse.import("fuse-test-runner").FuseBoxTestRunner;
        const runner = new FuseBoxTestRunner(this.opts);
        runner.start();
    }
}<commit_msg>Registers global variables before the test run (#486)<commit_after>import { FuseAPI } from "./lib/FuseApi";
export class BundleTestRunner {
    public fuse: FuseAPI;
    public reporter: string;
    public opts: any;
    constructor(public bundle: any, opts?: any) {
        this.opts = opts || {};
        this.reporter = opts.reporter || "fuse-test-reporter";
        this.fuse = bundle.FuseBox;
    }

    public start() {
        if (this.bundle.registerGlobals) {
            this.bundle.registerGlobals();
        }
        const FuseBoxTestRunner = this.fuse.import("fuse-test-runner").FuseBoxTestRunner;
        const runner = new FuseBoxTestRunner(this.opts);
        runner.start();
    }
}
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0023734177215189874, 'mean_word_length': 2.7315634218289087, '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': '1515957', 'n_tokens_mistral': 396, 'n_tokens_neox': 384, 'n_words': 86}