-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
[Pester 4.0.2] Gherkin scenario counts are broken #714
Comments
Just an update: I'm still working on this -- I updated Gherkin with the new options on Invoke-Pester, but the exact nature of how the Context and Describe are wrong eluded me today. I did spend a little time playing with scoping in Gherkin to see if I can figure out how to make mocks and indeed, variables persist through the scopes that they should -- will need to work on that a little more. |
I was just wondering how to tell that you are done with this, so just let me know when you feel like it's ready. Just a head up, as highlighted in #697 the mocks are currently working only for the first describe if the function is defined inside of describe, it's a bug, so don't get tripped by it. |
As discussed in #721, I've changed Gherkin to run each "Scenario" as a "Describe" (aka Context), which I think work around that mocking problem and makes variable scoping work roughly the way I wanted it to. The work for this is done now. All the tests pass on my box, so I'll wait for the build on the PR ;-) I clearly need to add some additional tests, because I found a couple of things by running the gherkin tests on the dev branch of Configuration. I had to fix a few tests, because of the scoping changes, but I feel really good about that, because they were mostly sloppy scoping problems. |
Ok, this is fixed @nohwnd, even works on PS2 now... |
Should this work in 4.0.3-rc? Because Scenarios Passed is 0 in a simple single scenario, although all steps passed. I'll try to investigate further if it should work. |
Just saw this note -- I've been ignoring email. 😉 I'll look into it. |
@Jaykul could you have a look pls? |
Wait, what? Did they used to be backwards? Looks correct now:
|
I'm pretty sure this is fixed. There's a test in Gherkin.Tests.ps1 to ensure it stays that way. Need repro otherwise @ronaldborman |
The changes to how Describe and Context are handled in Pester 4 broke the output for Gherkin by flipping the values of "Context" and "Describe" in the
$Pester.TestResult
...I need to investigate further -- just wanted to log this here so we can be sure to fix it before release.
Any thoughts about how to include tests that fail so that I can test the result of failing tests ... without ... failing tests? (Wow, that's confusing).
The text was updated successfully, but these errors were encountered: