Viscalyx.Assert

1.2.1-preview0001

Assertions for Pester that can improve your tests.

Minimum PowerShell version

5.1

This is a prerelease version of Viscalyx.Assert.

Installation Options

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

Install-Module -Name Viscalyx.Assert -RequiredVersion 1.2.1-preview0001 -AllowPrerelease

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

Install-PSResource -Name Viscalyx.Assert -Version 1.2.1-preview0001 -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 Viscalyx.Assert contributors. All rights reserved.

Package Details

Author(s)

  • Viscalyx

Tags

Pester Assertion Testing TDD BDD Assert PesterAssertion

Functions

Assert-BitwiseFlag Assert-BlockString Assert-NotBitwiseFlag Assert-ObjectMethod Assert-ObjectProperty

Dependencies

This module has no dependencies.

Release Notes

## [1.2.1-preview0001] - 2025-12-15

### Added

- `Assert-BitwiseFlag`
 - New command to assert that a value has the specified bitwise flag set.
   Supports integers, enums, and array processing with `-Each` parameter.
   Alias: `Should-HaveFlag`.
 - Added `-All` parameter to require all array elements have the flag set
   (default behavior when used with `-Each`).
 - Added `-Any` parameter to require at least one array element has the flag
   set when used with `-Each`.
- `Assert-NotBitwiseFlag`
 - New command to assert that an integer value does not have specific bitwise
   flags set. Supports integers, enums, and array processing with `-Each`
   parameter. Alias: `Should-NotHaveFlag`.
 - Added `-All` parameter to require all array elements do not have the flag set
   (default behavior when used with `-Each`).
 - Added `-Any` parameter to require at least one array element does not
   have the flag set when used with `-Each`.
- Added private functions:
 - `Assert-BitwiseType` - Validates that a value is compatible with bitwise
   operations (integer or enum type).
 - `Get-ProcessedPipelineInput` - Processes pipeline input for assertion
   commands, handling single-element array unwrapping.
 - `Test-BitwiseCompatible` - Tests whether a value can be used in bitwise
   operations (integers and enums).
 - `Test-BitwiseFlagSet` - Tests if a value has specific bitwise flags set.

### Changed

- Bump action codeql-action/upload-sarif to v4
- Bump action checkout to v6

FileList

Version History

Version Downloads Last updated
1.2.1 5 12/15/2025
1.2.1-previe... (current version) 3 12/15/2025
1.2.0 8 10/4/2025
1.1.1-previe... 3 10/4/2025
1.1.0 5 10/3/2025
1.1.0-previe... 3 10/3/2025
1.0.0 14 2/4/2025
0.1.1-previe... 4 2/4/2025
0.1.1-previe... 4 2/2/2025
0.1.1-previe... 4 2/2/2025
0.1.1-previe... 68 8/26/2024
0.1.1-previe... 55 8/22/2024
0.1.0-previe... 5 8/20/2024
Show more