vexx32 / PSKoans

A simple, fun, and interactive way to learn the PowerShell language through Pester unit testing.
GNU General Public License v3.0
1.72k stars 174 forks source link

About Enumerations Bug - "You are already in a test case" #369

Closed blithen closed 4 years ago

blithen commented 4 years ago

Describe "Koan Bug, Issue, or Help Request"

Working through the "About Enumerations" module, i believe there is a bug with the test itself because it throws this error when running:

Describing 'About Enumerations' has damaged your karma.

    You have not yet reached enlightenment.

    The answers you seek...

Exception calling "EnterTest" with "0" argument(s): "You are already in a test case."

    Please meditate on the following code:

× It has a numeric type backing each enumeration type
at <ScriptBlock>, C:\Users\crinderneck\Documents\PowerShell\Modules\Pester\4.9.0\Functions\It.ps1: line 276
276:                 $pester.EnterTest()

The issue is with Pester itself so ??

Context "The Problematic Assertions"

The afflicting It block is 'has a numeric type backing each enumeration type'

Context "Your Attempts"

I tried editing the tests to make it go through but no dice, the only "fix" is to delete the entire section that the test is in, which defeats the purpose of going through the koans! haha.

blithen commented 4 years ago

Updated to the latest version of pester and it appears my problem has resolved itself, sorry!

indented-automation commented 4 years ago

Well I've found one unrelated bug because Windows PS doesn't understand a bit.

"It has a numeric type backing each enumeration type" is old though. You might want to Update-PSKoan -Topic AboutEnumerations

Thanks for posting the reason, I'll stop looking :-D