PesterConverter

0.2.0-preview0008

Commands to convert Pester tests.

Minimum PowerShell version

7.0

This is a prerelease version of PesterConverter.
There is a newer prerelease version of this module available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PesterConverter -RequiredVersion 0.2.0-preview0008 -AllowPrerelease

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PesterConverter -Version 0.2.0-preview0008 -Prerelease

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

Copyright the PesterConverter contributors. All rights reserved.

Package Details

Author(s)

  • Viscalyx

Tags

Pester Converter

Functions

Convert-PesterSyntax

Dependencies

This module has no dependencies.

Release Notes

## [0.2.0-preview0008] - 2024-08-02

### Added

- Public commands:
 - `Convert-PesterSyntax`
   - Add support for Should operators:
     - Be
     - BeExactly
     - BeFalse
     - BeGreaterOrEqual
     - BeGreaterThan
     - BeIn
     - BeLessOrEqual
     - BeLessThan
     - BeLike
     - BeLikeExactly
     - BeNullOrEmpty
     - BeOfType
     - BeTrue
     - Contain
     - Match
     - MatchExactly
     - Throw
   - Added new parameter `OutputPath` to write the resulting file to
     a separate path.
- Add integration tests.

### Fixed

- Improve code to resolve ScriptAnalyzer warnings and errors.
- Localize all the strings.
- `Convert-PesterSyntax`
 - The `Should` operators `BeLike` and `BeLikeExactly` was mistakenly not
   calling their respectively conversion function.
 - Correctly handle abbreviated named parameters.
- `Should -BeFalse`, `Should -BeTrue` and `Should -BeNullOrEmpty` are now
 correctly converted when `Because` is the only positional parameter.
- Negated `Should -Not -BeLessThan` now converts to `Should-BeGreaterThanOrEqual`
 to correctly handle scenario when actual value and expected value are the same.
- Negated `Should -Not -BeGreaterThan` now converts to `Should-BeLessThanOrEqual`
 to correctly handle scenario when actual value and expected value are the same.
- Fix parameter name in `Convert-ShouldBeOfType`
- Minor change to `Get-AstDefinition` to handle when a file is not correctly
 parsed.

FileList

Version History

Version Downloads Last updated
0.2.0-previe... 3 8/6/2024
0.2.0-previe... (current version) 2 8/2/2024
0.2.0-previe... 162 7/14/2024
0.2.0-previe... 2 7/12/2024
0.2.0-previe... 2 7/12/2024
0.2.0-previe... 2 7/12/2024
0.2.0-previe... 1 7/11/2024
0.2.0-previe... 1 7/11/2024
0.2.0-previe... 1 7/11/2024
0.1.0-previe... 1 7/11/2024
Show more