Interface ProjectToolsInit

Development tools specifiers for the project.

Each property contains either project tool specifier, or a function creating such tool for the given project.

interface ProjectToolsInit {
    jest?: Partial<{
        automock: boolean;
        bail: number | boolean;
        cache: boolean;
        cacheDirectory: string;
        changedFilesWithAncestor: boolean;
        changedSince: string;
        ci: boolean;
        clearMocks: boolean;
        collectCoverage: boolean;
        collectCoverageFrom: string[];
        coverageDirectory: string;
        coveragePathIgnorePatterns: string[];
        coverageProvider: CoverageProvider;
        coverageReporters: CoverageReporters;
        coverageThreshold: CoverageThreshold;
        dependencyExtractor: string;
        detectLeaks: boolean;
        detectOpenHandles: boolean;
        displayName: string | DisplayName;
        errorOnDeprecated: boolean;
        expand: boolean;
        extensionsToTreatAsEsm: string[];
        fakeTimers: FakeTimers;
        filter: string;
        findRelatedTests: boolean;
        forceCoverageMatch: string[];
        forceExit: boolean;
        globals: ConfigGlobals;
        globalSetup: undefined | null | string;
        globalTeardown: undefined | null | string;
        haste: HasteConfig;
        id: string;
        injectGlobals: boolean;
        json: boolean;
        lastCommit: boolean;
        listTests: boolean;
        logHeapUsage: boolean;
        maxConcurrency: number;
        maxWorkers: string | number;
        moduleDirectories: string[];
        moduleFileExtensions: string[];
        moduleNameMapper: {
            [key: string]: string | string[];
        };
        modulePathIgnorePatterns: string[];
        modulePaths: string[];
        noStackTrace: boolean;
        notify: boolean;
        notifyMode: string;
        onlyChanged: boolean;
        onlyFailures: boolean;
        openHandlesTimeout: number;
        outputFile: string;
        passWithNoTests: boolean;
        preset: undefined | null | string;
        prettierPath: undefined | null | string;
        projects: (string | InitialProjectOptions)[];
        randomize: boolean;
        replname: undefined | null | string;
        reporters: (string | ReporterConfig)[];
        resetMocks: boolean;
        resetModules: boolean;
        resolver: undefined | null | string;
        restoreMocks: boolean;
        rootDir: string;
        roots: string[];
        runner: string;
        runTestsByPath: boolean;
        runtime: string;
        sandboxInjectedGlobals: string[];
        setupFiles: string[];
        setupFilesAfterEnv: string[];
        showSeed: boolean;
        silent: boolean;
        skipFilter: boolean;
        skipNodeResolution: boolean;
        slowTestThreshold: number;
        snapshotFormat: {
            callToJSON?: boolean;
            compareKeys?: null;
            escapeRegex?: boolean;
            escapeString?: boolean;
            highlight?: boolean;
            indent?: number;
            maxDepth?: number;
            maxWidth?: number;
            min?: boolean;
            printBasicPrototype?: boolean;
            printFunctionName?: boolean;
            theme?: {
                comment?: string;
                content?: string;
                prop?: string;
                tag?: string;
                value?: string;
            };
        };
        snapshotResolver: string;
        snapshotSerializers: string[];
        testEnvironment: string;
        testEnvironmentOptions: Record<string, unknown>;
        testFailureExitCode: string | number;
        testLocationInResults: boolean;
        testMatch: string[];
        testNamePattern: string;
        testPathIgnorePatterns: string[];
        testRegex: string | string[];
        testResultsProcessor: string;
        testRunner: string;
        testSequencer: string;
        testTimeout: number;
        transform: {
            [regex: string]: string | TransformerConfig;
        };
        transformIgnorePatterns: string[];
        unmockedModulePathPatterns: string[];
        updateSnapshot: boolean;
        useStderr: boolean;
        verbose?: boolean;
        watch: boolean;
        watchAll: boolean;
        watchman: boolean;
        watchPathIgnorePatterns: string[];
        watchPlugins: (string | [string, Record<string, unknown>])[];
        workerIdleMemoryLimit: string | number;
        workerThreads: boolean;
    }> | ProjectJestConfig | ((project: ProjectConfig) => ProjectJestConfig);
    package?:
        | PackageJson
        | ProjectPackage
        | PromiseLike<PackageJson>
        | ((project: ProjectConfig) => ProjectPackage);
    rollup?: RollupOptions | ProjectRollupConfig | ((project: ProjectConfig) => ProjectRollupConfig);
    typescript?: RawCompilerOptions | ProjectTypescriptConfig | ((project: ProjectConfig) => ProjectTypescriptConfig);
}

Properties

jest?: Partial<{
    automock: boolean;
    bail: number | boolean;
    cache: boolean;
    cacheDirectory: string;
    changedFilesWithAncestor: boolean;
    changedSince: string;
    ci: boolean;
    clearMocks: boolean;
    collectCoverage: boolean;
    collectCoverageFrom: string[];
    coverageDirectory: string;
    coveragePathIgnorePatterns: string[];
    coverageProvider: CoverageProvider;
    coverageReporters: CoverageReporters;
    coverageThreshold: CoverageThreshold;
    dependencyExtractor: string;
    detectLeaks: boolean;
    detectOpenHandles: boolean;
    displayName: string | DisplayName;
    errorOnDeprecated: boolean;
    expand: boolean;
    extensionsToTreatAsEsm: string[];
    fakeTimers: FakeTimers;
    filter: string;
    findRelatedTests: boolean;
    forceCoverageMatch: string[];
    forceExit: boolean;
    globals: ConfigGlobals;
    globalSetup: undefined | null | string;
    globalTeardown: undefined | null | string;
    haste: HasteConfig;
    id: string;
    injectGlobals: boolean;
    json: boolean;
    lastCommit: boolean;
    listTests: boolean;
    logHeapUsage: boolean;
    maxConcurrency: number;
    maxWorkers: string | number;
    moduleDirectories: string[];
    moduleFileExtensions: string[];
    moduleNameMapper: {
        [key: string]: string | string[];
    };
    modulePathIgnorePatterns: string[];
    modulePaths: string[];
    noStackTrace: boolean;
    notify: boolean;
    notifyMode: string;
    onlyChanged: boolean;
    onlyFailures: boolean;
    openHandlesTimeout: number;
    outputFile: string;
    passWithNoTests: boolean;
    preset: undefined | null | string;
    prettierPath: undefined | null | string;
    projects: (string | InitialProjectOptions)[];
    randomize: boolean;
    replname: undefined | null | string;
    reporters: (string | ReporterConfig)[];
    resetMocks: boolean;
    resetModules: boolean;
    resolver: undefined | null | string;
    restoreMocks: boolean;
    rootDir: string;
    roots: string[];
    runner: string;
    runTestsByPath: boolean;
    runtime: string;
    sandboxInjectedGlobals: string[];
    setupFiles: string[];
    setupFilesAfterEnv: string[];
    showSeed: boolean;
    silent: boolean;
    skipFilter: boolean;
    skipNodeResolution: boolean;
    slowTestThreshold: number;
    snapshotFormat: {
        callToJSON?: boolean;
        compareKeys?: null;
        escapeRegex?: boolean;
        escapeString?: boolean;
        highlight?: boolean;
        indent?: number;
        maxDepth?: number;
        maxWidth?: number;
        min?: boolean;
        printBasicPrototype?: boolean;
        printFunctionName?: boolean;
        theme?: {
            comment?: string;
            content?: string;
            prop?: string;
            tag?: string;
            value?: string;
        };
    };
    snapshotResolver: string;
    snapshotSerializers: string[];
    testEnvironment: string;
    testEnvironmentOptions: Record<string, unknown>;
    testFailureExitCode: string | number;
    testLocationInResults: boolean;
    testMatch: string[];
    testNamePattern: string;
    testPathIgnorePatterns: string[];
    testRegex: string | string[];
    testResultsProcessor: string;
    testRunner: string;
    testSequencer: string;
    testTimeout: number;
    transform: {
        [regex: string]: string | TransformerConfig;
    };
    transformIgnorePatterns: string[];
    unmockedModulePathPatterns: string[];
    updateSnapshot: boolean;
    useStderr: boolean;
    verbose?: boolean;
    watch: boolean;
    watchAll: boolean;
    watchman: boolean;
    watchPathIgnorePatterns: string[];
    watchPlugins: (string | [string, Record<string, unknown>])[];
    workerIdleMemoryLimit: string | number;
    workerThreads: boolean;
}> | ProjectJestConfig | ((project: ProjectConfig) => ProjectJestConfig)

Initializer of Jest configuration of the project.

One of:

  • Jest configuration instance.
  • Jest initialization options extending autogenerated ones.
  • Function creating Jest configuration.
package?:
    | PackageJson
    | ProjectPackage
    | PromiseLike<PackageJson>
    | ((project: ProjectConfig) => ProjectPackage)

Initializer of package configuration of the project.

One of:

  • Package configuration instance.
  • Raw package.json contents, or promise-like instance resolving to ones extending autoloaded one.
  • Function creating package configuration.
rollup?: RollupOptions | ProjectRollupConfig | ((project: ProjectConfig) => ProjectRollupConfig)

Initializer of Rollup configuration of the project.

One of:

  • Rollup initialization options extending default ones.
  • Rollup configuration instance.
  • Function creating Rollup configuration.
typescript?: RawCompilerOptions | ProjectTypescriptConfig | ((project: ProjectConfig) => ProjectTypescriptConfig)

Initializer of TypeScript configuration of the project.

One of:

  • TypeScript compiler options to extend the ones loaded from tsconfig.json file.
  • TypeScript configuration instance.
  • Function creating TypeScript configuration.