github pester/Pester 5.0.1

latest releases: 5.6.0-beta1, 5.5.0, 5.5.0-rc1...
3 years ago

The Parameters of Invoke-Pester changed significantly from v4. This release adds a compatibility parameter set.

It should be possible to use all v4 parameters to Invoke-Pester:

Invoke-Pester -Script $testFile -PassThru -Verbose -OutputFile $tr `
    -OutputFormat NUnitXml -CodeCoverage "$tmp/*-*.ps1" `
    -CodeCoverageOutputFile $cc -Show All

The compatibility is not 100%:

  • neither -Script not -CodeCoverage take hashtables, they just take a collection of paths. This is scheduled for 5.1.0.

  • The -Strict parameter and -PesterOption are ignored. Strict will possibly be fixed in 5.1.0 as well. -PesterOption is superseded by -Configuration, and you most likely don't need it in your workflow right now.

  • The -Output \ -Show parameter takes all the values of v4.

    • but translates only the most used options to Pester 5 compatible options. Otherwise it uses Detailed output.
    • It also allows all the Pester 5 output options, to allow you to use Diagnostic during migration.
    • This whole Parameter set is deprecated, and prints a warning.

For more options and the Advanced interface see simple and advanced interface above on how to invoke Pester.

Don't miss a new Pester release

NewReleases is sending notifications on new releases.