Skip to content

Why temp.ps1? #123

@skataben

Description

@skataben

Why does Pester dynamically create a "temp" command, save it to "$TestDrive\temp.ps1", dotsource it, and then invoke the "temp" command?

Why not just directly invoke the scriptblock used to create the "temp" command? Could doing so remove the need for having a TestDrive? Also, why is there a TestDrive?

My needs for Pester don't cover this, and I'm just wondering what the use cases are.

(I'm referring to the code in It.ps1)

Edit: I found the wiki for the TestDrive. My original question remains, however. What value does temp.ps1 provide?

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