Closed pjstam closed 2 years ago
I think by default it should run the tests in tests/ folder. Could you share the output? Especially interested in the task headers that should tell what are the path resolving to.
Also, if your project is a DSC Community project (running HQRM tasks) then some tests that are under QA might also be duplicated in those HQRM tests. Having the logs would help know what happened.
Hi @gaelcolas , It looks like the line at 875/876 in the file Invoke-Pester.pester.build.ps1 is causing this issue (task _v5). There is a double Join-Path, one with capital T -> 'Test' and one with t -> 'test' (probably done because of a case sensitive filesystem). A bit further at line 884 there is a loop that loops through the configured paths in the build.yml. So when uncommenting just one path the loop takes place one time, thus one test sequence. When leaving the build.yml default (everything commented) the double Join-Path is applied, thus running the tests twice.
Regards, Peter
Running the tests on Linux and passing the wrong case than the actual folder name or filename Pester seems to handle it. If I pass Tests
when the actual folder is test
, Pester finds the tests.
So I think it is safe just to remove one the later Join-Path
(line 876).
Problem description
Hi there, It looks like the pester tests run twice when the Path: is left default (commented). Workaround is to specify the paths. Regards, Peter
Verbose logs
How to reproduce
Create a New-SampleModule with 'simplemodule' type.
Expected behavior
It should run once.
Current behavior
It's running twice.
Suggested solution
It's ok for me to just uncomment the build.yml, maybe solving it in the future.
Operating system the target node is running
PowerShell version and build the target node is running
Module version used