Boost your productivity with Pester snippets
ISESteroids comes with TAB expansion of code snippets which is really easy to use. Actually this is how easy it is:
You just type a shortcut and press TAB to expand it.
There is also little to memorize. The Describe is dsc, the Context is ctx and the assertions use the first letter of each word for shortcut. The only exception is Should Be NullOrEmpty which is just sbn and not sbnoe.
Installing the snippets
Installing the snippets is easy as well. Update your copy of Pester to the latest version (3.3.1) and import it before importing the latest version of ISESteroids (220.127.116.11).
The easiest way to do that is importing both modules in your ISE profile.
This is how you do that:
- Expand additional menu to access All tools
- Open the ISE profile
- Add calls to Import-Module as shown in picture
- Restart ISE
As noted by Tobias Weltner, author of ISESteroids: Beginning with the current release 18.104.22.168 loading other modules before ISESteroids should not matter anymore. Loading snippets is still done on startup only though, so you have to load Pester first.Share on: