KC's Workspace
    Preparing search index...

    Function coveragePlugin

    • Create a plugin that configures test.coverage.

      Behavior matrix:

      • (true, true): replace with { enabled: true }.
      • (true, false) or (true): merge defaultCoverage.
      • (false, any): delete coverage if it exists.
      • ({}, true): replace coverage with the provided object.
      • ({}, false): merge the provided object with existing coverage.

      Parameters

      • opt: CoverageOption

        Coverage input option.

      • replace: boolean = false

        Whether to replace the coverage object instead of merging.

      Returns VitestConfigPlugin<"website", UserConfig>