"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const package_path_helper_1 = require("../helpers/package-path-helper");
process.on("message", (data) => {
    if (data.karmaConfig) {
        const pathToKarma = package_path_helper_1.resolvePackagePath("karma", {
            paths: [data.karmaConfig.projectDir],
        });
        const KarmaServer = require(path.join(pathToKarma, "lib/server"));
        const karma = new KarmaServer(data.karmaConfig, (exitCode) => {
            process.exit(exitCode);
        });
        karma.start();
    }
});
