Skip to content

Issue in AboutPSObjects #366

Description

@vexx32

Describe "Koan Bug, Issue, or Help Request"

The assertion on line 53 is suffixed with a Sort-Object that is currently not doing anything. The intention here is to sort the property names from $Object.PSObject.Properties to ensure the property names are always in the same order, but currently this is not going to do that.

Context "The Problematic Assertions"

https://github.com/vexx32/PSKoans/blob/29a7068d17b5a69218a1eea4cacace80457ebbd9/PSKoans/Koans/Constructs%20and%20Patterns/AboutPSObjects.Koans.ps1#L53

One suggestion might be:

$ExpectedProperties = $Object.PSObject.Properties.Name | Sort-Object
$PropertyNames | Should -Be $ExpectedProperties

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions