Last active
November 9, 2022 21:44
-
-
Save ninmonkey/bea8f60bcc271c8155f610d2b9c83bcd to your computer and use it in GitHub Desktop.
Pester5 Foreach-Loop snippet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// to use snippets, see: https://code.visualstudio.com/docs/editor/userdefinedsnippets | |
// The monkey makes it easier to find in menus | |
"Pester ⇢ ForEach Data 🐒": { | |
"prefix": "pestForEach 🐒 Test Data", | |
"body": [ | |
"It '\"<${1:Name}>\" Returns \"<expected>\"' -ForEach @(", | |
" @{ ${1:Name} = ${2:x} ; Expected = ${3:y} }", | |
") {", | |
" ${0:YourFunction} -${1:Name} \\$${1:Name} | Should -Be \\$Expected", | |
"}" | |
], | |
"description": "template for data-driven test" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment