Skip to content

Rename [Mock] -Module to -FromModule, and deprecate -Module #2035

Open
@johndog

Description

@johndog

... or -CallingModule, etc. The name "-Module" suggests that Mock needs to know which module is providing the function to be mocked, not which calling module needs to have the mock defined... the latter of these being the actuality.

Summary of the feature request

This was discussed in #462, and seems to be recurring stumbling block, as the purpose of -Module defies intuition. Every time I personally return to pester after some hiatus I wind up relearning the purpose of -Module.

How should it work? (optional)

Make -Module and -ModuleName aliases for compatibility, but make the new name the principle name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions