Pester Test - PowerShell #2079
-
Hi @dlwyatt I have a module ABC.psm1 In that module there are multiple functions i want to create a test that will check each function in the module and see if it has help file, is param block declared , etc etc. how can i go to scan each function using peste ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Dunno. Probably some combination of Get-Command, the AST, and possibly Get-Help. Once you have objects that contain all the things you're looking for, putting them into Pester tests with |
Beta Was this translation helpful? Give feedback.
-
Take a look at tst/Help.Tests.ps1 and tst/Pester.Tests.ps1 in this repo. We have a few tests like that. |
Beta Was this translation helpful? Give feedback.
-
OK. Thank You All. |
Beta Was this translation helpful? Give feedback.
Take a look at tst/Help.Tests.ps1 and tst/Pester.Tests.ps1 in this repo. We have a few tests like that.