pester / Pester

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

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

Closed fflaten closed 2 months ago

fflaten commented 3 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 3 months ago

Yes please, I thought we are already doing that.

nohwnd commented 3 months ago

Please implement in 6.0.0 and backport.