'Exclude functions from Pester code coverage

The latest versions of Pester work with a PesterConfiguration object to set the configuration for the unit testing, as described here.

In the 'old' command line settings of Invoke-Pester I could utilize a specific setting (Function) for Code Coverage, in which you can include/exclude functions in the to be tested file.

However, this option seems to be missing in the new PesterConfiguration object. I also cannot use both methods together unfortunately.

How can I still exclude functions for code coverage, while keeping the PesterConfiguration?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source