Viscalyx.Assert.psd1
@{ # Script module or binary module file associated with this manifest. RootModule = 'Viscalyx.Assert.psm1' # Version number of this module. ModuleVersion = '1.2.0' # ID used to uniquely identify this module GUID = '40fd578c-f818-46bc-84d3-8de933d0cf7d' # Author of this module Author = 'Viscalyx' # cSpell: ignore Viscalyx # Company or vendor of this module CompanyName = 'Viscalyx' # Copyright statement for this module Copyright = 'Copyright the Viscalyx.Assert contributors. All rights reserved.' # Description of the functionality provided by this module Description = 'Assertions for Pester that can improve your tests.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.1' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @('Assert-BlockString','Assert-ObjectMethod','Assert-ObjectProperty') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @('Should-BeBlockString','Should-HaveMethod','Should-HaveProperty') # DSC resources to export from this module DscResourcesToExport = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = @('Pester', 'Assertion', 'Testing', 'TDD', 'BDD', 'Assert', 'PesterAssertion') # A URL to the license for this module. LicenseUri = 'https://github.com/viscalyx/Viscalyx.Assert/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/viscalyx/Viscalyx.Assert' # A URL to an icon representing this module. IconUri = 'https://avatars.githubusercontent.com/u/53994072' # ReleaseNotes of this module ReleaseNotes = '## [1.2.0] - 2025-10-04 ### Added - `Assert-ObjectProperty` - Added parameter `NoTypeCheck` to opt-in for lenient type checking, allowing PowerShell type coercion when comparing values. - Added private functions: - `Get-TypeName` - Gets the full type name of a value as a string, or ''null'' if the value is null. - `New-AssertionError` - Creates a Pester assertion error record with optional ''because'' reasoning to standardize error creation across assertion commands. - `Test-ObjectHasMethod` - Tests whether an object has a specified method, supporting various object types including PSCustomObjects and .NET objects. - `Test-ObjectHasProperty` - Tests whether an object has a specified property, supporting hashtables, PSCustomObjects, and .NET objects. - `Test-ObjectType` - Tests whether two values have the same type for strict type checking in assertion commands. - `Test-ValueEquality` - Tests whether two values are equal, supporting both scalar values and arrays with structural comparison. ### Changed - `Assert-ObjectProperty` - Added parameter `Each` to opt-in for element-by-element checking when passing arrays via pipeline or parameter. Without this parameter, the command now checks properties on the array object itself (e.g., `Count`, `Length`). - Improved error messages to distinguish between type mismatches and value mismatches when strict type checking is enabled. - `Assert-ObjectMethod` - Added parameter `Each` to opt-in for element-by-element checking when passing arrays via pipeline or parameter. Without this parameter, the command now checks methods on the array object itself. - `Assert-BlockString` - Refactored to use the `New-AssertionError` private function for consistent error handling across all assertion commands. - `New-AssertionError` - Updated to follow Pester''s error message pattern by inserting the `Because` clause before `, but` in error messages (e.g., "Expected \<value\>, because \<reason\>, but got \<actual\>"). - Localized strings have been reorganized to consolidate common reusable words (like "because", "actual", and "expected") into a dedicated "Common localized strings" section with a consistent `Common_Word*` naming pattern, reducing duplication across command-specific string keys. ' # Prerelease string of this module Prerelease = '' } # End of PSData hashtable } # End of PrivateData hashtable } |