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