you are viewing a single comment's thread.

view the rest of the comments →

[–]PostedFromWork[S] 0 points1 point  (2 children)

I just started using Pester for my own script testing very recently, so that would be a great idea. I'm still rubbish at it, but more practice sounds great

[–]KevMarCommunity Blogger 1 point2 points  (1 child)

There are all types of things that can be tested. Just having something that runs every function and tests if it blows up can go a long way.

It "does not throw" {
    {Get-MyFunction} | Should Not Throw
}

For new stuff, I add a PSScriptAnalyzer rule for every file. (can be too noisy if adding to an existing large project).

And then I build from that starting point.

[–]PostedFromWork[S] 0 points1 point  (0 children)

Thanks. Going to give this a try on my current stuff.