You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before the PR Metrics extension was open sourced, it was limited to using Pester 3.0. This older version of Pester resulted in many constraints when writing unit tests, which are no longer necessary following the upgrade (as part of open sourcing) to Pester 5.0. In addition, the API differences between Pester 3.0 and Pester 5.0 are significant and in many cases the legacy APIs are being used.
This task is to track upgrading the tests from Pester 3.0 idioms to Pester 5.0 idioms. This work should comprise:
Fixing the mocks to use the new idioms. The old idioms will eventually become unsupported, so moving to the new idioms will be necessary at some stage.
Extracting out mocks where possible, to avoid repetition.
Less reliance on console printing to validate calls have been made successfully. This will accelerate adding new functionality as it will require fewer test changes.
Better validation of array/collection response types. These responses can differ depending on the environment in which they are run, so all reliance on ordering should be removed for improved robustness.
Better use of mocks to increase the number of unit tests and reduce the number of integration tests.
Better splitting of the tests between unit and integration tests.
Note that this is best implemented via a series of changes given the significant volume of issue highlighted above. If done incrementally, the change should be manageable.
The text was updated successfully, but these errors were encountered:
Before the PR Metrics extension was open sourced, it was limited to using Pester 3.0. This older version of Pester resulted in many constraints when writing unit tests, which are no longer necessary following the upgrade (as part of open sourcing) to Pester 5.0. In addition, the API differences between Pester 3.0 and Pester 5.0 are significant and in many cases the legacy APIs are being used.
This task is to track upgrading the tests from Pester 3.0 idioms to Pester 5.0 idioms. This work should comprise:
Information on migrating Pester tests can be found at https://pester.dev/docs/migrations/v3-to-v4 and https://dsccommunity.org/blog/converting-tests-to-pester5/, and the Pester docs can be found at https://pester.dev/.
Note that this is best implemented via a series of changes given the significant volume of issue highlighted above. If done incrementally, the change should be manageable.
The text was updated successfully, but these errors were encountered: