Is your feature request related to a problem? Please describe.
Monkey365 already includes a Pester test suite under the tests folder, but unit test coverage for the core internal modules is still limited.
Running the project with Set-StrictMode -Version Latest helps catch some issues during execution, but it does not replace automated unit tests, static analysis, or pull request validation.
Describe the solution you'd like
Expand the Pester test suite to cover the main internal components, including:
- Runspace creation, execution, cleanup, and error handling
- API request construction, pagination, retries, and failure scenarios
- Authentication and token-handling workflows
- Configuration file loading, validation, and default values
- Shared functions and other core module behavior
External services should be mocked where possible so the tests remain reliable and can run without access to an Azure or Microsoft 365 tenant.
Add a reusable workflow that:
- Runs Pester and PSScriptAnalyzer for pull requests and commits
- Publishes test results and code coverage
- Fails when tests or static analysis checks fail
- Supports Windows PowerShell and PowerShell Core where applicable
- Can be reused by other Monkey365 repositories
An initial code coverage baseline should be established and increased incrementally as more modules are covered.
Improved test coverage and pull request validation will help catch regressions earlier, make refactoring safer, validate edge cases, and provide clearer documentation of the expected behavior of internal functions.
Related issues
Is your feature request related to a problem? Please describe.
Monkey365 already includes a Pester test suite under the tests folder, but unit test coverage for the core internal modules is still limited.
Running the project with
Set-StrictMode -Version Latesthelps catch some issues during execution, but it does not replace automated unit tests, static analysis, or pull request validation.Describe the solution you'd like
Expand the Pester test suite to cover the main internal components, including:
External services should be mocked where possible so the tests remain reliable and can run without access to an Azure or Microsoft 365 tenant.
Add a reusable workflow that:
An initial code coverage baseline should be established and increased incrementally as more modules are covered.
Improved test coverage and pull request validation will help catch regressions earlier, make refactoring safer, validate edge cases, and provide clearer documentation of the expected behavior of internal functions.
Related issues