@nikovirtala/projen-constructs
    Preparing search index...

    Interface VitestConfigOptions

    Vitest Config.

    interface VitestConfigOptions {
        bail?: number;
        coverageDirectory?: string;
        coverageEnabled?: boolean;
        coverageProvider?: CoverageProvider;
        coverageReporters?: CoverageReporter[];
        environment?: Environment;
        exclude?: string[];
        globals?: boolean;
        include?: string[];
        isolate?: boolean;
        passWithNoTests?: boolean;
        pool?: Pool;
        printConsoleTrace?: boolean;
        slowTestThreshold?: number;
        typecheckChecker?: string;
        typecheckEnabled?: boolean;
        typecheckTsconfig?: string;
        updateSnapshots?: boolean;
    }
    Index

    Properties

    bail?: number

    Stop running tests after certain number of failures.

    coverageDirectory?: string

    Coverage output directory.

    "coverage"
    
    coverageEnabled?: boolean

    Coverage enabled.

    coverageProvider?: CoverageProvider

    Coverage provider type.

    coverageReporters?: CoverageReporter[]

    Coverage reporters.

    '["text", "lcov"]'
    
    environment?: Environment

    The environment that will be used for testing.

    exclude?: string[]

    A list of glob patterns that should be excluded from your test files.

    • Vitest's configDefaults.exclude
    globals?: boolean

    Register apis globally. If you prefer to use the APIs globally like Jest, set to true.

    include?: string[]

    A list of glob patterns that match your test files.

    • Vitest's configDefaults.include
    isolate?: boolean

    Run tests in an isolated environment. This option has no effect on vmThreads pool.

    Disabling this option might improve performance if your code doesn't rely on side effects.

    passWithNoTests?: boolean

    Vitest will not fail, if no tests will be found.

    pool?: Pool

    Pool used to run tests in.

    "forks"
    
    printConsoleTrace?: boolean

    Always print console traces when calling any console method.

    slowTestThreshold?: number

    The number of milliseconds after which a test or suite is considered slow.

    typecheckChecker?: string

    Tool to use for type checking. Checker should implement the same output format as tsc.

    "tsc --noEmit"
    
    typecheckEnabled?: boolean

    Enable typechecking alongside your regular tests.

    true (for TypeScript projects)
    
    typecheckTsconfig?: string

    Path to custom tsconfig, relative to the project root.

    "tsconfig.dev.json"
    
    updateSnapshots?: boolean

    Update snapshot files. This will update all changed snapshots and delete obsolete ones.