version 4.08
Issues across the assertion files.
$foo = @("item1","item2") # using System.Array as example
$foo | Should BeNullOrEmpty```
The result comes back:
Expected: value to be empty but it was: {item1 item2}
Ideally the formatting of the $actualvalue should be @(item1,item2) or some other nomenclature. The former conveys a mismatched type. Types and their handling should be consistent through all the assertions. I think with arrays the output is being splatted where it is as though the array actually gets stringified.
Optionally I think items should display as [regex]::Escape($actualvalue) to see line-feeds and other "gotchas" often required in exact matching, or some option flag to support this.
Lastly the $actualvalue may have different formatting requirements, and perhaps these can be customizable somehow? ie table form w/ autosizing?
version 4.08
Issues across the assertion files.
The result comes back:
Expected: value to be empty but it was: {item1 item2}Ideally the formatting of the $actualvalue should be @(item1,item2) or some other nomenclature. The former conveys a mismatched type. Types and their handling should be consistent through all the assertions. I think with arrays the output is being splatted where it is as though the array actually gets stringified.
Optionally I think items should display as [regex]::Escape($actualvalue) to see line-feeds and other "gotchas" often required in exact matching, or some option flag to support this.
Lastly the $actualvalue may have different formatting requirements, and perhaps these can be customizable somehow? ie table form w/ autosizing?