Skip to content

Test discovery on linux fails to find tests in hidden folders #2515

@tbutler-qontigo

Description

@tbutler-qontigo

Checklist

What is the issue?

I am writing tests for github actions which are in the .github folder so my tests are in tests/.github
Invoke-Pester does not find these tests unless I explicitly specify tests/.github

This works fine in windows powershell core but not in linux powershell core

I am using pester v5.6.0

Expected Behavior

Invoke-Pester finds all tests in all folders, including hidden folders, without having to explicitly specify the folder name
This should work in linux and in windows

Steps To Reproduce

  1. Place a tests in a folder named tests/.github
  2. Call Invoke-Pester from the parent folder

Observe that the test is discovered in windows but not in linux

Describe your environment

Working (in windows):

Pester version     : 5.6.0 C:\Program Files\WindowsPowerShell\Modules\Pester\5.6.0\Pester.psm1
PowerShell version : 5.1.22621.3672
OS version         : Microsoft Windows NT 10.0.22631.0

Not working (in WSL2 Ubuntu)

Pester version     : 5.6.0 /home/XXXX/.local/share/powershell/Modules/Pester/5.6.0/Pester.psm1
PowerShell version : 7.4.3
OS version         : Unix 5.15.153.1

Possible Solution?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions