Skip to content

v2020.3.0-preview Pester installation problem #2560

Closed
@mrboring

Description

@mrboring

System Details

System Details Output

### VSCode version: 1.43.0 78a4c91400152c0f27ba4d363eb56d2835f9903a x64

### VSCode extensions:      
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version: 2.1.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

I suspect you are aware of this. This is for other users who may have this issue.

The following is displayed in the terminal:

WARNING: Failed to import Pester version 5.0.0. You must install Pester module to run or debug Pester tests.
WARNING: You can install Pester by executing: Install-Module Pester -MinimumVersion 5.0.0 -Scope CurrentUser -Force

Executing Install-Module Pester -MinimumVersion 5.0.0 -Scope CurrentUser -Force results in the following error:

> Install-Module Pester -MinimumVersion 5.0.0 -Scope CurrentUser -Force

Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9685:34
Line |
9685 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and module name 'Pester'. Try Get-PSRepository to
     | see all available registered module repositories.

Expected Behaviour

I expected Pester 5 to be installed.

Actual Behaviour

I got an error.

Workaround:

> Install-Module Pester -Scope CurrentUser -Force -AllowPrerelease

> get-module pester -ListAvailable | ? Version -eq '5.0.0'

    Directory: C:\Users\Alan\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     5.0.0      beta       Pester                              Desk      {Describe, Context, It, Should…}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions