<commit_before>import Mocha from "mocha";
import * as path from "path";
import {RelativePattern, workspace} from "vscode";
import * as glob from "glob";

export async function run(): Promise<void> {
    const mocha = new Mocha({
        reporter: "list",
        ui: "bdd",
        color: true,
    });

    const testsRoot = path.resolve(__dirname, "..");
    const files = glob.sync("**/**.test.js", { cwd: testsRoot });

    console.log("Number of test files to run:", files.length);
    // Add files to the test suite
    files.forEach((file) => mocha.addFile(path.resolve(testsRoot, file)));

    // Run the mocha test
    return new Promise((resolve, reject) => {
        try {
            mocha.run((failures: number) => {
                if (failures > 0) {
                    reject(new Error(`${failures} tests failed.`));
                } else {
                    resolve();
                }
            });
        } catch (err) {
            reject(err);
        }
    });
}
<commit_msg>debug: ci test<commit_after>import Mocha from "mocha";
import * as path from "path";
import * as glob from "glob";

export async function run(): Promise<void> {
    const mocha = new Mocha({
        reporter: "list",
        ui: "bdd",
        color: true,
    });

    const testsRoot = path.resolve(__dirname, "..");
    const files = glob.sync("**/**.test.js", { cwd: testsRoot });

    console.log("Number of test files to run:", files.length);
    // Add files to the test suite
    files.forEach((file) => mocha.addFile(path.resolve(testsRoot, file)));

    // Run the mocha test
    return new Promise((resolve, reject) => {
        try {
            mocha.run((failures: number) => {
                if (failures > 0) {
                    reject(new Error(`${failures} tests failed.`));
                } else {
                    resolve();
                }
            });
        } catch (err) {
            reject(err);
        }
    });
}

{'fraction_non_alphanumeric': 0.15051020408163265, 'fraction_numerical': 0.0010204081632653062, 'mean_word_length': 1.858600583090379, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '2302434', 'n_tokens_mistral': 582, 'n_tokens_neox': 557, 'n_words': 159}