You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tested the following script to test nested Pester Context blocks:
#pester nested context test with 4.0.3
describe "Nested Context Test with Pester 4.0.3" {
context "Context #1" {
it "will test foo" {
'foo'| should be foo
}
context "nested contex 1" {
it "will test foo again" {
'foo'| should not be foo
}
}
}
}
And pester fully supports it:
Executing all tests in .\pester-test.ps1
Executing script .\pester-test.ps1
Describing Nested Context Test with Pester 4.0.3
Context Context #1
[+] will test foo 517ms
Context nested contex 1
[-] will test foo again 182ms
Expected: value was {foo}, but should not have been the same
at <ScriptBlock>, C:\temp\pester\pester-test.ps1: line 1818: 'foo'| should not be foo
Tests completed in 699ms
Tests Passed: 1, Failed: 1, Skipped: 0, Pending: 0, Inconclusive: 0
However, Format-Pester results does not handle the nested context blocks in the report generated. Can you please add support for this pester feature?
The text was updated successfully, but these errors were encountered:
I have tested the following script to test nested Pester Context blocks:
And pester fully supports it:
However, Format-Pester results does not handle the nested context blocks in the report generated. Can you please add support for this pester feature?
The text was updated successfully, but these errors were encountered: