Team Ai
Datasetpublic

MegaBites-AI/Windows-powershell

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes372downloads
README.md30 linesDownload Raw Back to xUnit
1# xUnit Tests2 3The folder contains xUnit tests for PowerShell Core project.4 5## Running xUnit Tests6 7Go to the top level of the PowerShell repository and run full set of tests:8`Start-PSxUnit` inside a self-hosted copy of PowerShell.9 10Go to the test project folder and run `dotnet test -c Release`.11 12Use [`filter`][xunit-filter] parameter to run only needed tests:13```powershell14dotnet test -c Release --filter "FullyQualifiedName~UnitTest1   # Runs tests which have UnitTest1 in FullyQualifiedName15dotnet test --filter Name~TestMethod1   # Runs tests whose name contains TestMethod116```17 18## Creating xUnit Tests19 20Keep the folder structure that is for Pester [../../test/powershell](../../test/powershell) and C# files [../../src](../../src).21 22Use namespace names started with `PSTests`.23```c#24namespace PSTests.YourNameSpace25{26}27```28 29[xunit-filter]: https://learn.microsoft.com/dotnet/core/testing/selective-unit-tests30