Skip to content

How do I run Pester Unit tests locally before performing a Pull Request? #262

@dennisl68-castra

Description

@dennisl68-castra

I've cloned this project as I'd like to help out with a current Pull Request (#258).
However, when I try to run the Unit tests after a build in VS Code using the Extension Pester Test Explorer, I get a lot of errors as shown below (the build fails to run the tests as well):

Starting discovery in 7 files.
[-] Discovery in D:\UsbRepos\One\xFailOverCluster.GitHub\tests\Unit\MSFT_xCluster.Tests.ps1 failed with: System.IO.FileNotFoundException: The specified module 'xFailOverCluster' was not loaded because no valid module file was found in any module directory.
...
Discovery found 0 tests in 643ms.
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThe issue is a question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions