chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.04k stars 890 forks source link

(maint) Enhance local testing developer experience #3436

Closed corbob closed 2 months ago

corbob commented 2 months ago

Description Of Changes

Enhance the local testing setup to allow faster writing and iterating on Pester tests

Motivation and Context

The existing setup required rebuilding the Chocolatey CLI package every time you wanted to test changes to tests.

Testing

  1. In the tests directory run vagrant up
  2. Verify that the tests run.
  3. Delete some (or all) of the pester test files.
  4. Run vagrant provision default --provision-with test.
  5. Verify that the deleted pester file is no longer executed (when I tested, I went from 29 files evaluated to 28 files evaluated).
  6. Run vagrant provision default --provision-with clear-packages,test.
  7. Verify that the clear-packages provisioning script runs, followed by the test packages being packaged during the test provisioning script.

Operating Systems Testing

Change Types Made

Change Checklist

Related Issue

N/A

gep13 commented 2 months ago

@corbob thank you for making these improvements!