Update 'Start-PSPester' to make it more user friendly (#7210)

- Make `Start-PSPester` call `Restore-Pester` automatically when needed,
- Make `-Path` a positional parameter for `Start-PSPester`.
This commit is contained in:
Christoph Bergmeister
2018-07-03 11:16:37 -07:00
committed by Dongbo Wang
parent 55bbc3fcd1
commit 56e50ce632
3 changed files with 5 additions and 24 deletions
@@ -108,14 +108,11 @@ Currently, we have a minuscule number of tests which are run by using xUnit.
When working on new features or fixes, it is natural to want to run those tests locally before making a PR.
Three helper functions are part of the build.psm1 module to help with that:
* `Restore-PSPester` will restore Pester, which is needed to run `Start-PSPester`
* `Start-PSPester` will execute all Pester tests which are run by the CI system
* `Start-PSxUnit` will execute the available xUnit tests run by the CI system
Our CI system runs these as well; there should be no difference between running these on your dev system, versus in CI.
Make sure that you run `Restore-PSPester` before running `Start-PSPester`, or it will fail to run.
When running tests in this way, be sure that you have started PowerShell with `-noprofile` as some tests will fail if the
environment is not the default or has any customization.