Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pester 5 does not allow to pass parameters into test scripts #1701

Closed
fawohlsc opened this issue Oct 5, 2020 · 1 comment
Closed

Pester 5 does not allow to pass parameters into test scripts #1701

fawohlsc opened this issue Oct 5, 2020 · 1 comment

Comments

@fawohlsc
Copy link

fawohlsc commented Oct 5, 2020

1. General summary of the issue

In previous versions of Pester it was possible to pass parameters to test scripts using the following syntax:

Invoke-Pester -Script @{ Path = '.\*.Tests.ps1'; Parameters = @{ Parameter1= 'Lorem ipsum...' } }

Now with Pester 5.0.4, this results in an error:
image

2. Describe Your Environment

Pester version : 5.0.4 C:\Program Files\WindowsPowerShell\Modules\Pester\5.0.4\Pester.psd1
PowerShell version : 7.0.3
OS version : Microsoft Windows NT 10.0.19041.0

3. Expected Behavior

Pester should allow to pass parameters into test scripts.

4.Current Behavior

In previous versions of Pester it was possible to pass parameters to test scripts using the following syntax:

Invoke-Pester -Script @{ Path = '.\*.Tests.ps1'; Parameters = @{ Parameter1= 'Lorem ipsum...' } }

Now with Pester 5.0.4, this results in an error:
image

5. Possible Solution

None.

6. Context

Passing in the github.run_id into my Pester tests.

@fawohlsc
Copy link
Author

fawohlsc commented Oct 5, 2020

Closing myself since duplicate of #1485

@fawohlsc fawohlsc closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant