Skip to content

Cannot bind argument to parameter 'Command' because it is null. #66

Description

@rexrob

Pester 5
PoshSpec 228

When running the following test I get an error

TEST

Describe "sdsjdhs sddhsj sdhsdh shdjshd"{
File C:\workbook\Modules.txt { Should -Exist }
}

ERROR
sdsjdhs sddhsj sdhsdh shdjshd.File 'Modules.txt' Should -Exist 4ms (2ms|2ms)
ParameterBindingValidationException: Cannot bind argument to parameter 'Command' because it is null.
at , C:\Program Files\WindowsPowerShell\Modules\poshspec\2.2.8\Private\Invoke-PoshspecExpression.ps1:18
Tests completed in 40.55s
Tests Passed: 0, Failed: 1, Skipped: 0 NotRun: 0

Appears to be an issue with in Invoke-PoshspecExpression

$InputObject.Expression appears to be null when executed by invoke-expression
Invoke-Expression $InputObject.Expression

This seems to occur with all test function

Please Assist

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