Skip to content

Refactor Show-Advice Testing #298

Description

@vexx32

Describe "Functionality"

Currently the tests for Show-Advice's invalid koan errors interact with the file system in order to receive JSON that can't be used by the function and emit the expected errors.

It should be possible to refactor these tests such that Get-Content is simply mocked to only return a valid JSON string that isn't a valid advice snippet, to avoid the interaction with the filesystem.

Context "Private or Public? What are the use cases? Parameters? Options?"

Tests are located here: https://github.com/vexx32/PSKoans/blob/master/Tests/Functions/Public/Show-Advice.Tests.ps1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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