Context
#
SYNOPSISProvides logical grouping of It blocks within a single Describe block.
#
SYNTAX#
DESCRIPTIONProvides logical grouping of It blocks within a single Describe block. Any Mocks defined inside a Context are removed at the end of the Context scope, as are any files or folders added to the TestDrive during the Context block's execution. Any BeforeEach or AfterEach blocks defined inside a Context also only apply to tests within that Context .
#
EXAMPLES#
EXAMPLE 1#
PARAMETERS#
-NameThe name of the Context. This is a phrase describing a set of tests within a describe.
#
-TagOptional parameter containing an array of strings. When calling Invoke-Pester, it is possible to specify a -Tag parameter which will only execute Context blocks containing the same Tag.
#
-FixtureScript that is executed. This may include setup specific to the context and one or more It blocks that validate the expected outcomes.
#
CommonParametersThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
#
INPUTS#
OUTPUTS#
NOTES#
RELATED LINKShttps://pester.dev/docs/v4/commands/Describe
https://pester.dev/docs/v4/commands/It
https://pester.dev/docs/v4/commands/BeforeEach
https://pester.dev/docs/v4/commands/AfterEach
https://pester.dev/docs/v4/commands/Should
https://pester.dev/docs/v4/usage/mocking
https://pester.dev/docs/v4/usage/testdrive
#
EDIT THIS PAGEThis page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the pester/Pester repository. See our contribution guide for more information.