pester / Pester

Pester is the ubiquitous test and mock framework for PowerShell.
https://pester.dev/
Other
3.11k stars 473 forks source link

Documentation update required due to new assertion added by #959 #960

Closed it-praktyk closed 5 years ago

it-praktyk commented 6 years ago

In the pull request #959 new assertions were added.

Quotation from the pull request description

Add -Because parameters to all assertions Fixes #312 Add -BeLessOrEqual and -BeGreaterOrEqual Add -Contain (that operates on arrays) Fixes #121 Add -BeLikeExactly Add -HaveType alias to -BeOfType Fix assertion messages in -BeOfType Fixes #729 Throw argument exception when -BeOfType is given type that is not loaded Add -PassThru to -Throw to get the exception when some is thrown and passes the filters Add -BeTrue to test for truthy values Add -BeFalse to test for falsy values Add -HaveCount to count stuff in collections

An appropriate documentation needs to be aligned with the current code.

it-praktyk commented 6 years ago

@nohwnd, what do you think about assigning it to the same milestone that code will be released?

nohwnd commented 6 years ago

Sure, but don't start documenting it just yet, maybe some of the changes break compatibility, or will be rejected from the final release, so let's not waste time putting changes in that won't be needed in the end.

nohwnd commented 6 years ago

The about should part was done in #990

bergmeister commented 6 years ago

Why is the milestone for 4.4 when this already shipped in 4.2?

it-praktyk commented 6 years ago

IMHO, the wiki page needs review too.

nohwnd commented 6 years ago

For reference, this is how all the assertion operators can be easily listed import-module pester; & (get-module pester) { $AssertionOperators

ClaudioESSilva commented 6 years ago

I have updated the Should page with missing parts 😄 https://github.com/pester/Pester/wiki/Should

nohwnd commented 6 years ago

@ClaudioESSilva thank you :) @it-praktyk is there still a reason to keep this open?

it-praktyk commented 6 years ago

Yeap, because I've found - in your comments something what should be added to the wiki.

BTW, can you check if is the syntax correct?

import-module pester; & (get-module pester) { $AssertionOperators
nohwnd commented 6 years ago

@it-praktyk yes, it's just missing the last curly brace. it should be this:

import-module pester; & (get-module pester) { $AssertionOperators }
nohwnd commented 5 years ago

This functionality will be published as Get-ShouldOperator.