Skip to content

Ensure we're testing module functions and logic #66

Open
@vexx32

Description

@vexx32

What You Are Seeing?

Many tests shadow the actual module function with an ad-hoc function that does nothing and only the tests use. As a result, there aren't really any tests for the module logic itself.

What is Expected?

Tests should be verifying the module behaves as intended given various inputs and outputs of mocked functions.

How Did You Get This To Happen? (Steps to Reproduce)

See for example:

$module = (Get-ChildItem "$($env:BuildRepositoryLocalPath)" -Recurse -Filter *.psd1).FullName[1]
Import-Module $module -Force
Function Get-CCMComputer {
param($Computer)
Invoke-RestMethod -Uri 'https://google.com'
}

System Details

N/A

Output Log

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions