Skip to content

[Issue]: Add unit tests for linting scripts to improve code coverage #231

@WilliamBerryiii

Description

@WilliamBerryiii

Issue Description

During code coverage analysis for PR #230, four linting scripts were identified with 0% test coverage. These scripts total 345 lines of production code without any unit tests.

Script Lines Current Coverage
scripts/linting/Markdown-Link-Check.ps1 141 0%
scripts/linting/Link-Lang-Check.ps1 90 0%
scripts/linting/Invoke-PSScriptAnalyzer.ps1 68 0%
scripts/linting/Invoke-LinkLanguageCheck.ps1 46 0%

Adding tests for these scripts would improve overall coverage from 18.05% toward the 30% target.

Acceptance Criteria:

  • Create scripts/tests/Markdown-Link-Check.Tests.ps1
  • Create scripts/tests/Link-Lang-Check.Tests.ps1
  • Create scripts/tests/Invoke-PSScriptAnalyzer.Tests.ps1
  • Create scripts/tests/Invoke-LinkLanguageCheck.Tests.ps1
  • All new tests pass in CI workflow

Additional Context

Existing test patterns are available in scripts/tests/ for reference. The security script tests (Test-DependencyPinning.Tests.ps1, Test-SHAStaleness.Tests.ps1) demonstrate mocking patterns for external tool dependencies.

Related: #201, #230

Metadata

Metadata

Labels

needs-triageRequires triage and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions