Invoke-Pester shows 'PropertyNotFoundException: The property 'Count' cannot be found on this object.' because of Set-StrictMode
When Set-StrictMode -Version Latest is set, the Count property on non-collections forces errors and hence failed tests.
[-] Pipeline IshObject Single 193ms PropertyNotFoundException: The property 'Count' cannot be found on this object. Verify that the property exists. at <ScriptBlock>, C:\github\ISHRemote\Source\ishremote\trisoft.ishremote\Cmdlets\UserRole\AddIshUserRole.Tests.ps1: line 84 [+] Pipeline IshObject Multiple 295ms Cleaning Test Data and Variables Tests completed in 138.26s Passed: 421 Failed: 86 Skipped: 4 Pending: 0 Inconclusive: 0
Workaround for now Set-StrictMode -Off making ISHRemote tests successful on Tridion Docs 13 SP1 (13.0.1)
Tests completed in 123.09s Passed: 507 Failed: 0 Skipped: 4 Pending: 0 Inconclusive: 0