vexx32 / PSKoans

A simple, fun, and interactive way to learn the PowerShell language through Pester unit testing.
GNU General Public License v3.0
1.73k stars 176 forks source link

Expanded examples for foreach alias, loops and keywords #473

Open PalmEmanuel opened 2 years ago

PalmEmanuel commented 2 years ago

PR Summary

Added a few examples in AboutLoopsAndPipelines regarding the foreach cmdlet alias vs loop and how the break, continue and return keywords affect pipelines vs standard loops.

Fixes #404

Context

No particular context or background for the PR, see issue for linked discussions and examples of topics.

Changes

Added a new Context to AboutLoopsAndPipelines called "Loops and Keywords" with 5 new It assertions to clarify some important things regarding pipeline loops vs keyword/standard loops.

Checklist

PalmEmanuel commented 2 years ago

I had trouble coming up with very clear examples for all topics in #404 without making them very bloated or advanced, let me know if there's something that doesn't feel right!

vexx32 commented 2 years ago

Thanks for the PR! I haven't had the time to give this a thorough review yet, but I plan to shortly. 💖

Sorry for the delay in response. 🙂