-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Some unit tests need mock scope updates to specify -ModuleName LintingHelpers after the refactoring in PR #379. This is a follow-up technical debt item.
PR #379 extracted shared boilerplate functions into LintingHelpers.psm1:
Test-LintingFilesExist- Common "no files found" patternWrite-LintingHeader- Standardized header outputNew-LintingContext- Context creation
Unit tests that mock these functions need their mock scope updated to specify -ModuleName LintingHelpers. Without this update, mocks may not target the correct function scope.
Required Changes:
- Review test files for scripts that use LintingHelpers functions
- Update
Mockcalls to include-ModuleName LintingHelpersparameter - Verify tests pass with updated mock scopes
Likely Affected Test Files:
scripts/tests/linting/Invoke-PSScriptAnalyzer.Tests.ps1scripts/tests/linting/Invoke-YamlLint.Tests.ps1- Any other tests mocking the extracted functions
Additional Context
Related PR: #379
Acceptance Criteria:
- All unit tests using
LintingHelpersfunctions specify correct-ModuleName - Test suite passes without warnings
- Mock scoping follows PowerShell best practices
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers