Skip to content

Should-BeHashtable -Actual is at Position 1, should be Position 0 #2942

Closed

Description

@nohwnd

Should-BeHashtable is a single-subject assertion (only $Actual is positional, everything else is named), but $Actual is declared at Position = 1 instead of Position = 0. That is the same inconsistency #2933 fixed for Should-BeTrue/Should-BeNull etc., but Should-BeHashtable was not part of that sweep.

# src/functions/assert/Hashtable/Should-BeHashtable.ps1
[Parameter(Position = 1, ValueFromPipeline = $true)]
$Actual,

Should be Position = 0. Caught by the new assertion convention tests (#2941), which currently allow-list it. Once fixed, the allow-list entry should be removed.

Activity

  1. added this to the 6.1.0 milestone on Jul 31, 2026
  2. added a commit that references this issue on Jul 31, 2026
    d16bda3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions