@types/karma-parallel
TypeScript icon, indicating that this package has built-in type declarations

0.3.4 • Public • Published

Installation

npm install --save @types/karma-parallel

Summary

This package contains type definitions for karma-parallel (https://github.com/joeljeske/karma-parallel#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/karma-parallel.

index.d.ts

import "karma";

declare module "karma" {
    interface ConfigOptions {
        /**
         * Options for this plugin
         * see {@link https://github.com/joeljeske/karma-parallel#options}
         */
        parallelOptions?: ParallelOptions | undefined;
    }
    interface ParallelOptions {
        /**
         * regex or function used to determine if a reporter needs to only received aggregated events from the browser shards.
         * It is used to ensure coverage reporting is accurate amongst all the shards of a browser
         *  It is also useful for some programmatic reporters such as junit reporters that need to operate on a single set of test outputs and not once for each shard.
         * Set to null to disable aggregated reporting
         */
        aggregatedReporterTest?: ((reporter: object) => boolean) | RegExp | null | undefined;
        /**
         * The number of browser instances to use to test.
         * If you test on multiple types of browsers, this spin up the number of executors for each browser type
         * @default cpu_cores-1
         */
        executors?: number | undefined;
        /**
         * This plugin works by overriding the test suite describe() function.
         * When it encounters a describe, it must decide if it will skip the tests inside of it, or not
         * @default 'round-robin'
         */
        shardStrategy?: "round-robin" | "description-length" | "custom" | undefined;
        /**
         * Custom function that will determine if a describe block should run in the current executor.
         * It is a function that is serialized and re-constructed on each executor.
         * The function will be called for every top level describe block and should return true if the describe block should run for a the current executor
         */
        customShardStrategy?: ((options: ShardStrategOptions) => boolean) | undefined;
    }

    interface ShardStrategOptions {
        /**
         * the total number of executors
         */
        readonly executors: number;
        /**
         * the 0-based index of the current executor
         */
        readonly shardIndex: number;
        /**
         * the string passed to the describe block (useful for gaining context of the current description)
         */
        readonly description: string;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/karma

Credits

These definitions were written by Piotr Błażejewicz (Peter Blazejewicz).

Readme

Keywords

none

Package Sidebar

Install

npm i @types/karma-parallel

Weekly Downloads

363

Version

0.3.4

License

MIT

Unpacked Size

7.45 kB

Total Files

5

Last publish

Collaborators

  • types