Refactor module into small functions, with unit tests
Closed this issue · 0 comments
leojonathanoh commented
Current
Module not subscribed to functional approach.
Expectation
Module subscribed to functional approach.
Discussion
In powershell, there is a strong convention of adopting a functional approach, where each cmdlet or function has its own file. Unit tests file are alongside the function.
Benefits:
- Unit testable
- Unit tests are documentation for the function
- Modular and reusable functions
- Non-monolithic approach makes it easier for contributors to open PRs for fixes or features.
- Improved debuggability