What is new since 4.2.0
- Improved output, that expands $true, $false, $null, collections, dates and so on, to make the results of assertions, and test case expansions much easier to read.
Describing new assertion output
[-] strings now have single quotes like 'this' 63ms
Expected strings to be the same, but they were different.
String lengths are both 4.
Strings differ at index 0.
Expected: ' abc'
But was: 'abc '
-----------^
5: 'abc ' | Should -Be " abc"
[-] empty string and null became <empty> and $null 36ms
Expected <empty>, but got $null.
9: $null | Should -Be ''
[-] numbers have nothing around them 30ms
Expected 0, but got 1.
13: 1 | Should -Be 0
[-] decimals and doubles use point 0.1 45ms
Expected 0, but got 0.1.
17: 0.1 | Should -Be 0
[-] booleans are written as $true and $false 71ms
Expected $false, but got $true.
21: $true | Should -Be $false
[-] dates are expanded to include ticks 83ms
Expected 0001-01-01T00:00:00.0000000, but got 2018-02-20T18:39:15.7773648+01:00.
25: (Get-Date) | Should -Be ([datetime]::MinValue)
[-] collections are wrapped in @() 49ms
Expected an empty collection, but got collection with size 3 @(1, 2, 3).
- There are now tests that make sure that we have comprehensive help.
(The version 4.3.0 was briefly published, but dependencies were missing from the package, so a new version had to be published. That is why this is both minor and patch bump.)
Breaking changes
- None, unless you depend on the exact wording of our assertion messages.