Skip to content

Tests in the describe block 'Style rules' are not executed for files in the main Pester folder #689

@it-praktyk

Description

@it-praktyk

Under updating help for the Invoke-Pester function (undocumented Show parameter) I found that some lines contain trailing spaces

2017-01-20 03_05_14-sapien powershell studio 2017

That should throw errors for the test 'Styles rules' (what I observerd for my previous commits).

After investigation I've found that issue is caused by the line 122 in the file Pester.Tests.ps1

Is

Get-ChildItem $pesterRoot -Include *.ps1,*.psm1

but should be

Get-ChildItem $pesterRoot\* -Include *.ps1,*.psm1

Issue confirmed for

Pester version : 3.4.6 C:\Users<SOME DIRECTORY>\Pester\Pester.psm1
PowerShell version : 5.1.14393.693
OS version : Microsoft Windows NT 10.0.14393.0

but v. 4.0.2-RC is also affected (?).

I'll prepare a pull requests to update affected files

  • chocolateyInstall.ps1
  • Pester.psm1
  • Pester.Tests.ps1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions