Skip to content

Question: Mocking static class #1695

Open
@VaughanJ

Description

@VaughanJ

Powershell 7 used.

I have a module that uses a lot of classes, some of them are static classes. I'm looking for some documentation on how best to mock these methods in the classes, especially the static classes. Can you point me to anything that might help please?

The closest I find is:
https://pester.dev/docs/usage/mocking

Which talks about mocking functions that called by classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions