|
952 | 952 | "#endregion"
|
953 | 953 | ],
|
954 | 954 | "description": "Region Block for organizing and folding of your code"
|
| 955 | + }, |
| 956 | + "IfShouldProcess": { |
| 957 | + "prefix": "IfShouldProcess", |
| 958 | + "body": [ |
| 959 | + "if (\\$PSCmdlet.ShouldProcess(\"${1:Target}\", \"${2:Operation}\")) {", |
| 960 | + "\t$0", |
| 961 | + "}" |
| 962 | + ], |
| 963 | + "description": "Creates ShouldProcess block" |
| 964 | + }, |
| 965 | + "CalculatedProperty": { |
| 966 | + "prefix": "Calculated-Property", |
| 967 | + "body": [ |
| 968 | + "@{name='${1:PropertyName}';expression={${2:\\$_.PropertyValue}}}$0" |
| 969 | + ], |
| 970 | + "description": "Creates a Calculated Property typically used with Select-Object." |
| 971 | + }, |
| 972 | + "PesterDescribeContextIt": { |
| 973 | + "prefix": "Describe-Context-It-Pester", |
| 974 | + "body": [ |
| 975 | + "Describe \"${1:DescribeName}\" {", |
| 976 | + "\tContext \"${2:ContextName}\" {", |
| 977 | + "\t\tIt \"${3:ItName}\" {", |
| 978 | + "\t\t\t${4:Assertion}", |
| 979 | + "\t\t}$0", |
| 980 | + "\t}", |
| 981 | + "}" |
| 982 | + ], |
| 983 | + "description": "Pester Describe block with nested Context & It blocks" |
| 984 | + }, |
| 985 | + "PesterDescribeBlock": { |
| 986 | + "prefix": "Describe-Pester", |
| 987 | + "body": [ |
| 988 | + "Describe \"${1:DescribeName}\" {", |
| 989 | + "\t$0", |
| 990 | + "}" |
| 991 | + ], |
| 992 | + "description": "Pester Describe block" |
| 993 | + }, |
| 994 | + "PesterContextIt": { |
| 995 | + "prefix": "Context-It-Pester", |
| 996 | + "body": [ |
| 997 | + "Context \"${1:ContextName}\" {", |
| 998 | + "\tIt \"${2:ItName}\" {", |
| 999 | + "\t\t${3:Assertion}", |
| 1000 | + "\t}$0", |
| 1001 | + "}" |
| 1002 | + ], |
| 1003 | + "description": "Pester - Context block with nested It block" |
| 1004 | + }, |
| 1005 | + "PesterContext": { |
| 1006 | + "prefix": "Context-Pester", |
| 1007 | + "body": [ |
| 1008 | + "Context \"${1:ContextName}\" {", |
| 1009 | + "\t$0", |
| 1010 | + "}" |
| 1011 | + ], |
| 1012 | + "description": "Pester - Context block" |
| 1013 | + }, |
| 1014 | + "PesterIt": { |
| 1015 | + "prefix": "It-Pester", |
| 1016 | + "body": [ |
| 1017 | + "It \"${1:ItName}\" {", |
| 1018 | + "\t${2:Assertion}", |
| 1019 | + "}$0" |
| 1020 | + ], |
| 1021 | + "description": "Pester - It block" |
955 | 1022 | }
|
956 | 1023 | }
|
0 commit comments