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

Errors while running Invoke-Pester (BeforeAll) #325

Closed
jaraddowning opened this issue Dec 15, 2023 · 1 comment
Closed

Errors while running Invoke-Pester (BeforeAll) #325

jaraddowning opened this issue Dec 15, 2023 · 1 comment

Comments

@jaraddowning
Copy link

jaraddowning commented Dec 15, 2023

In the PowerShell training module I'm getting the following error when running "Invoke-Pester".


    Directory: C:\Users\username\Exercism\powershell\hello-world


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        12/14/2023   4:36 PM                .exercism
-a----        12/14/2023   4:56 PM            204 HelloWorld.ps1
-a----        12/14/2023   5:22 PM            147 HelloWorld.tests.ps1
-a----        12/14/2023   4:36 PM           1252 HELP.md
-a----        12/14/2023   4:36 PM            976 README.md


> hello-world > Invoke-Pester





 [-] Error occurred in test script 'C:\Users\username\Exercism\powershell\hello-world\HelloWorld.tests.ps1' 183ms
   RuntimeException: The BeforeAll command may only be used inside a Describe block.
   at Assert-DescribeInProgress, C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\Describe.ps1: line 125
   at BeforeAll, C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\SetupTeardown.ps1: line 56
   at <ScriptBlock>, C:\Users\username\Exercism\powershell\hello-world\HelloWorld.tests.ps1: line 1
   at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Pester.psm1: line 297
   at Invoke-Pester, C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Pester.psm1: line 310
   at <ScriptBlock>, <No file>: line 1
Tests completed in 183ms
Passed: 0 Failed: 1 Skipped: 0 Pending: 0 Inconclusive: 0


> hello-world > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.2506
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2506
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

This is on Windows 11 and I am running the 3.2 version of the cli.

Copy link

Hello. Thanks for opening an issue on Exercism 🙂

At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.

This issue will be automatically closed. Please use this link to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!

If you're interested in learning more about this auto-responder, please read this blog post.

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