Skip to content

[Bug]: Invoke-YamlLint.Tests.ps1 type assertions use integers instead of strings #330

@WilliamBerryiii

Description

@WilliamBerryiii

Component

Scripts

Bug Description

Test assertions in Invoke-YamlLint.Tests.ps1 use integer values instead of strings when checking Set-GitHubOutput calls. The Set-GitHubOutput function accepts string parameters, so assertions should check for string values like '0' instead of integers like 0.

This was identified during code review of PR #326.

Expected Behavior

All Set-GitHubOutput assertions should use string values for consistency with the function's parameter type:

# Current (incorrect)
Should -Invoke Set-GitHubOutput -Times 1 -ParameterFilter { $Name -eq 'issues' -and $Value -eq 0 }

# Expected (correct)
Should -Invoke Set-GitHubOutput -Times 1 -ParameterFilter { $Name -eq 'issues' -and $Value -eq '0' }

Steps to Reproduce

  1. Review scripts/tests/linting/Invoke-YamlLint.Tests.ps1
  2. Note assertions at lines 161, 202, 252, 259, 266, 278, 290, 301 use integer values

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageRequires triage and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions