mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[breaking change] Major changes are as follows: - Add `Enable-ExperimentalFeature` and `Disable-ExperimentalFeature` cmdlets. - Remove `-ListAvailable` from `Get-ExperimentalFeature`. - Add `ArgumentCompleter` for `Get-ExperimentalFeature` cmdlet. - Refactor some existing Experimental Feature tests. - Make `ConfigScope` public and renamed `SystemWide` to `AllUsers`. Also update experimental feature code to prefer the current user config over the all user config.
xUnit Tests
These tests are completely Linux specific.
Every test class must belong to
[Collection("AssemblyLoadContext")]. This ensures that PowerShell's
AssemblyLoadContext is initialized before any other code is executed.
When this is not the case, late initialization fails with
System.InvalidOperationException : Binding model is already locked for the AppDomain and cannot be reset.
Having every class in the same collection is as close to an xUnit global init hook as can be done.
Running xUnit Tests
Go to the top level of the PowerShell repository and run:
Start-PSxUnit inside a self-hosted copy of PowerShell.