gaelcolas / gaelcolas/SampleModule

Pester Error when Function has no parameter

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
43
Forks
8
PR merge metrics
No merged PRs in 30d

Description

When a command has no parameter, the QA generic test errors as below.
see https://ci.appveyor.com/project/gaelcolas/chocolatey/build/1.0.2

```
[-] Error occurred in Describe block 6ms
RuntimeException: You cannot call a method on a null-valued expression.
at , C:\projects\chocolatey\chocolatey\tests\QA\module.tests.ps1: line 77
at , C:\projects\chocolatey\chocolatey\tests\QA\module.tests.ps1: line 77
at DescribeImpl, C:\projects\chocolatey\BuildOutput\modules\Pester\4.0.8\Functions\Describe.ps1: line 161
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at tests/QA/module.tests.ps1 line 77 and reproduce the failure using the AppVeyor build linked in the issue. Inspect how the generic QA test handles commands without parameters; done means that case no longer raises the null-valued-expression error and the QA tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.