pester / Pester

Pester is the ubiquitous test and mock framework for PowerShell.
https://pester.dev/
Other
3.11k stars 473 forks source link

Deduplicate files provided using Run.Path and -Path? #2530

Closed fflaten closed 4 months ago

fflaten commented 4 months ago

Using "/tests", "/tests/.github" should be enough. You only need to specify the hidden folder, the rest will be found using recursion unless you want to include only a subset of folders under tests.

I tried this initially but the .github tests ran twice on windows which is also not ideal.

Originally posted by @tbutler-qontigo in https://github.com/pester/Pester/issues/2515#issuecomment-2202080286

Should Pester deduplicate file paths provided using -Path / Run.Path? I don't see a reason why you'd want to run the same file multiple times without parameters.

Calling a file multiple times with different parameters (-Data) requires use of -Container / Run.Container which is unaffected by the suggested change to -Path.

nohwnd commented 4 months ago

Yes please, I thought we are already doing that.

nohwnd commented 4 months ago

Please implement in 6.0.0 and backport.