Skip to content

Pester Test #1

@baristaTam

Description

@baristaTam

Add a .Tests Pester file that uses Mock to verify the expected calls to 'Invoke-RestMethod' happen within Export-SplunkData

In case it's of value - here's a case where I have used with Mock in Pester to assert a method gets called (while preventing the actual call from happening):
https://github.com/uillinois-community/powershell-scripts/blob/4d0aa88edf33759e43d2221c2c4df012b9f95b8c/modules/AgileGitHub.Tests.ps1#L73

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