Skip to content

It uses TestCases instead of ForEach #2310

@ThomasNieto

Description

@ThomasNieto

Checklist

What is the issue?

The Data driven tests mentions that -ForEach is the parameter name and -TestCases is an alias for bc. However this is not the case the code is the opposite.

To define examples for a test, use -ForEach on an It block. On It block the parameter is also aliased -TestCases for backwards compatibility.

Pester/src/functions/It.ps1

Lines 131 to 132 in d81fdbc

[Alias("ForEach")]
[object[]] $TestCases,

Expected Behavior

Code and docs match

Steps To Reproduce

No response

Describe your environment

No response

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