Skip to content

Releases: pester/Pester

v3.4.1

22 Jul 05:26
Compare
Choose a tag to compare
  • Updated code to use Get-CimInstance if possible, then Get-WmiObject, for Nano compatibility. [GH-484]
  • Fixed failure message output of Should BeLike / BeLikeExactly. [GH-497]
  • Added some missing information to about_Should help. [GH-519]
  • Made -OutputFormat parameter optional, defaulting to NUnitXml. [GH-503]
  • Fix error messsage of Should Throw when null input is provided [GH-521]
  • Fix mocking bug on functions that contain certain parameter names (Metadata, etc). [GH-583]

3.4.0

21 Mar 12:31
Compare
Choose a tag to compare
  • Bug fix for PSv2 when no matching scripts are found by Invoke-Pester. [GH-441]
  • Added "Should BeLike" assertion. [GH-456]
  • Discarded unwanted pipeline output from BeforeEach / AfterEach / BeforeAll / AfterAll. [GH-468]
  • Allowed closures to be used as mocks. [GH-465]
  • Fixed invalid NUnit XML output if test script had a syntax error. [GH-467]
  • Fix for mocking advanced functions that define a parameter named 'Args'. [GH-471]
  • Fixed bug when trying to mock a command with a weird name containing a single quotation mark. [GH-474]
  • Fixed bug for mocking Cmdlets that do not contain any positional parameters. [GH-477]
  • Fixed bug when calling a mocked command from inside the mock. [GH-478]
  • Added PesterOption parameter, and a switch to tweak console output for better VSCode extension functionality. [GH-479]

3.3.14

16 Dec 14:48
Compare
Choose a tag to compare
  • Fixed Coverage analysis output, which broke in 3.3.12.

3.3.13

10 Dec 15:13
Compare
Choose a tag to compare
  • Fixed a bug where mocking Get-Command would result in infinite recursion. [GH-437]

3.3.12

10 Dec 15:12
Compare
Choose a tag to compare
  • Fixed a bug with mocking dynamic parameters on latest Windows 10 / PSv5 builds. [GH-419]
  • Fix for NUnit XML export on .NET core. [GH-420]
  • Added Set-TestInconclusive command. [GH-421]
  • Mocking improvements for calling original commands with begin/process/end blocks. [GH-422]
  • Case insensitive replacement of Test in help [GH-428]
  • Improve stack trace and exception console output [GH-426]
  • Added support for intercepting module-qualified calls to a mocked command. [GH-432]
  • Improved Assert-MockCalled to allow it to be passed an alias as the -CommandName.

3.3.11

08 Sep 15:22
Compare
Choose a tag to compare
  • Fixed a bug where mocking New-Object would cause a stack overflow. [GH-405]

3.3.10

08 Sep 15:22
Compare
Choose a tag to compare
  • Fully qualified calls to Get-Content within Mocking code, to avoid triggering client's mocked versions of that command. [GH-362]
  • Fixed a scoping error when calling the original command if no parameter filters match the call. [GH-362]
  • Added Ignore alias for -Skip on the It command, and updated NUnit output to flag these tests as Ignored instead of Skipped, for better integration with things like TeamCity. [GH-368]
  • Added support for Unicode to Should Contain. [GH-378]
  • Added support for side-by-side installations to chocolateyInstall.ps1. [GH-401]

3.3.9

24 May 01:21
Compare
Choose a tag to compare
  • Fixed Describe's handling of TestName filter when multiple strings are passed to Invoke-Pester's -TestName parameter.
  • Failing BeforeEach or AfterEach will fail the test [GH-326]
  • Added BeOfType operator to the Should command. [GH-327]
  • Fixed BeforeEach / etc parsing in PSv3+ so breakpoints and automatic variables ($PSCommandPath, etc) will work properly. [GH-333]
  • Fixed bug in 'Should Be' when comparing strings, and null or empty strings are piped in to the Should command. [GH-333]
  • Added some calls to Write-Progress in the It command. [GH-322]
  • Bug fix when mocking functions that are in the global scope; the original functions were being lost when the Describe block ended. [GH-323]
  • Improved failed assertion output from Assert-MockCalled; now behaves more like Should. [GH-324]
  • Added -ExclusiveFilter parameter to Assert-MockCalled. Works like -ParameterFilter, except there also must not be any calls to the mocked command which do not match the filter.
  • Added the "bin" folder to the PATH environment variable when installing from Chocolatey. Also removed the hard-coded -OutputXml and -Strict parameters from this file; only -EnableExit is always used from the bat file now. [GH-281]
  • PassThru object (when used in conjunction with -CodeCoverage) now includes information about Hit commands in addition to Missed commands. [GH-341]
  • Improvements to support for mocking advanced fynctions with dynamic parameters. [GH-346]
  • Fix for PowerShell v2 bug when mocking commands that have an -ArgumentList parameter with validation attributes. [GH-354]
  • Fixed stack trace output when the call to Should is in a file other than the file that contains the It block. [GH-358]

3.3.8

15 Apr 18:19
Compare
Choose a tag to compare

Minor fix for mocking when client code overwrites the $ExecutionContext built-in variable.

3.3.7

15 Apr 11:59
Compare
Choose a tag to compare

Minor fixes to Mocking:

  • Mocking AD cmdlets was producing errors due to how their Dynamic Parameters are returned. This has been fixed.
  • Mocking functions is now more robust in situations where the mocked function has potentially unresolved parameter sets at the time the dynamicparam block is evaluated, or where the mocked function has defined parameters named $ExecutionContext or $MyInvocation.