igniteui-angular-sovn
Version: 
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
70 lines (68 loc) • 2.2 kB
JavaScript
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
    config.set({
        basePath: "",
        frameworks: ["parallel", "jasmine", "@angular-devkit/build-angular"],
        files: [
            {
                pattern: "../../node_modules/hammerjs/hammer.min.js",
                watched: false,
            },
            {
                pattern: "../../node_modules/hammer-simulator/index.js",
                watched: false,
            },
            { pattern: "./test.css", watched: false },
            {
                pattern:
                    "../../dist/igniteui-angular-sovn/styles/igniteui-angular-sovn.css",
                watched: false,
            },
        ],
        plugins: [
            "karma-parallel",
            "karma-jasmine",
            "karma-coverage",
            "karma-chrome-launcher",
            "karma-spec-reporter",
            "karma-junit-reporter",
            "@angular-devkit/build-angular/plugins/karma",
        ],
        parallelOptions: {
            executors: 2,
            shardStrategy: "round-robin",
        },
        client: {
            //clearContext: false, // leave Jasmine Spec Runner output visible in browser
            jasmine: {
                random: false,
            },
            tagPrefix: "#",
            skipTags: "perf",
        },
        coverageReporter: {
            dir: require("path").join(__dirname, "../../coverage"),
            subdir: ".",
            reporters: [
                // reporters not supporting the `file` property
                { type: "cobertura" },
            ],
        },
        reporters: ["spec", "junit"],
        port: 9876,
        colors: true,
        logLevel: config.LOG_INFO,
        autoWatch: true,
        browsers: ["ChromeHeadlessNoSandbox"],
        browserDisconnectTimeout: 4000,
        customLaunchers: {
            ChromeHeadlessNoSandbox: {
                base: "ChromeHeadless",
                flags: ["--no-sandbox", "--disable-gpu"],
                debug: false,
            },
        },
        singleRun: false,
    });
};