pester / docs

Source files for the Pester website.
https://pester.dev
MIT License
41 stars 77 forks source link

Add usage page about filters #242

Open fflaten opened 1 year ago

fflaten commented 1 year ago

Consider rewriting Tags-page to be about filters in general. Should explain behavior when multiple filters are used like exclude/include/explicit priority. The latter is only indirectly mentioned on other pages, including deprecated v4-parameters in Invoke-Pester command ref.

I have a PesterConfiguration with two filter options set - $configuration.Filter.Tag and $configuration.Filter.FullName.

I expected, that the both filters will apply to the subset of tests and it'll narrow down the search so only specified tests that has the selected tag will be run. Pester works in a different manner. It creates a union of two filters so all the tests specified in $configuration.Filter.FullName will be launched as well as all the tests having $configuration.Filter.Tag tags.

If that's the strategy we expect from Pester, maybe we could mention this behavior it in the New-PesterConfiguration Filter documentation.

Originally posted by @tempora-mutantur in https://github.com/pester/Pester/issues/2278#issuecomment-1365287272

fflaten commented 1 year ago

Resource: https://github.com/pester/Pester/issues/1442