Skip to content

Pester 5 no longer has function-based CodeCoverage? (Smallest granularity is modules?) #2145

Open
@NickBrinsmade

Description

@NickBrinsmade

General summary of the issue

In Pester 4, you used to be able to call Invoke-Pester -CodeCoverage @{ Path='path\to\my\test\file'; Function='My-FunctionName' } but this syntax no longer works and it seems like you need to use the -Configuration parameter to pass in a PesterConfiguration object made with New-PesterConfiguration.

Is there any way to achieve the function-based CodeCoverage granularity? There is no 'function' parameter that can be passed in anymore and there isn't a property in the configuration object that has this.

Describe your environment

Steps to reproduce

Expected Behavior

Current Behavior

Possible Solution? (optional)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions