-
-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve BeTrue assertion #1316
Comments
That left us with the 3 remaining cases that we may need to analyze:
By looking at the code, it seems to be that this is due to the way the comparison are being performed within the |
Fixing this may affect people that are already relying on this unexpected behavior, so this could possible be a breaking change. @nohwnd Any comments? |
Yes, it would be a breaking change so it would need to be done in Pester v5. I want to re-visit the asseritons in v5 and I am now deciding if going in the direction of many breaking changes and better future behavior is better than keeping v5 more compatible to allow people to migrate to it. |
For what it matters, I would vote to improve the future behavior and not be too concerned with the breaking changes. We are already doing breaking changes in v5, so I think we should leverage it as a relatively clean slate to revisit, fix and change as much as possible. Within reason of course :) |
I think that as well. I will be talking about exactly this with the community on psconf and post summary afterwards so others can speak to it as well :) |
Described here a possible way forward for should, would keep the new functionality specification for that change #1423 |
Is this going to be addressed? Still present in 5.2.2 |
@marko-stanojevic I hope at some point. I wanted to move my Assert module into Pester for a long time and do more assertion related stuff, but unfortunately there were other things to focus on in 5.3 and previous releases, and there is also a blocking issue with dynamic parameters being limited to 32 parameter sets only in powershell. |
Will be fixed by #2428 where we have separate assertions for False, Falsy, True and Truthy. |
1. General summary of the issue
I understand that examples specified below is how PowerShell works but it's not so obvious what assertion to use to make a proper check against the $true value even from the Should page. It would be helpful at least for BeTrue assertion to have a proper compare check.
2. Describe Your Environment
3. Expected Behavior
Tests must fail.
4.Current Behavior
Tests passed.
The text was updated successfully, but these errors were encountered: