Skip to content
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

AboutAssignmentAndArithmetic: ExpectedMessage and implicit character ranges in Pester 5 #460

Open
indented-automation opened this issue Sep 14, 2021 · 1 comment
Labels
Category-Koans Invoking the Great Doubt Issue-Discussion Let's talk about it!

Comments

@indented-automation
Copy link
Contributor

Describe "Koan Bug, Issue, or Help Request"

  • AboutAssignmentAndArithmetic

Context "The Problematic Assertions"

  • Subtraction\cannot be used with strings
  • Modulus\cannot be used on non-numeric values

Context "Your Attempts"

N/A

Context "Additional Information"

In both cases the tests rely on Should -Throw -ExpectedMessage. The current release of PSKoans prefers Pester 4.10.1 which treats -ExpectedMessage an a literal.

In Pester 5 this string supports wildcards, which in turn breaks use of types such as [System.Object[]] in an expected message string.

See also: pester/Pester#1793

@indented-automation indented-automation added Category-Koans Invoking the Great Doubt Issue-Discussion Let's talk about it! labels Sep 14, 2021
@vexx32
Copy link
Owner

vexx32 commented Sep 14, 2021

Oh, hm, never thought of that. That's... annoying. Does pester offer an opt-out for the wildcard behaviour? 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Koans Invoking the Great Doubt Issue-Discussion Let's talk about it!
Projects
None yet
Development

No branches or pull requests

2 participants