Script tester for Pester
๐ฅ This is just a prototype.
A prototype of script that manipulates a self-contained .ps1
to enable testing it. We split the script in three pieces based on the comments and rewrite the script to make it only contain functions. Then we revert it back.
Sample usage
- To observe what is happening, the easiest way is to star VSCode, open
tester.ps1
andscript.ps1
. - Set breakpoints in
tester.ps1
on both. $path
lines. - Run the script and see script.ps1 change.
- Observe the output in the console to see the tests pass.