File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -172,8 +172,11 @@ Describe 'Hashtables' {
172172 }
173173
174174 It ' can check if keys or values are present in the hashtable' {
175+ # Enter keys and values in this table to make the below tests pass.
176+ # You should not need to modify the `Should` assertions themselves.
175177 $Hashtable = @ {
176- # Enter keys and values in this table to make the below tests pass
178+ # Example:
179+ # KeyName = Value
177180 }
178181
179182 $Hashtable.ContainsKey (' Carrots' ) | Should - BeTrue
Original file line number Diff line number Diff line change @@ -115,17 +115,22 @@ Describe 'Pipelines and Loops' {
115115 }
116116
117117 It ' can loop a set number of times' {
118- $Values = for ($i = 0 ; $i -lt 5 ; $i ++ ) {
118+ $Values = for ($num = 0 ; $num -lt 5 ; $num ++ ) {
119119 <#
120120 For loops are quite rare in native PowerShell code. They have their uses, but are
121121 frequently too semantically obscure to have a place in PS's verbose ecosystem.
122- Remember:
123- 1. ++ after the variable will reference the existing value then increment the variable.
124- 2. ++ before the variable will increment the variable and then reference the new value.
125122 #>
126- $i
123+ $num
127124 }
128- $Values | Should - Be __
125+
126+ # What will the above loop store in $Values?
127+ $Values | Should - Be @ (
128+ __
129+ __
130+ __
131+ __
132+ __
133+ )
129134 }
130135
131136 It ' can loop while a condition is $true' {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ param()
1616 sorts all characters in a string alphabetically. Punctuation and spaces should be ignored entirely.
1717#>
1818Describe ' Kata - Sorting Characters' {
19+
1920 BeforeAll {
2021 $Verification = {
2122 $Functions = [Hashset [string ]]::new([StringComparer ]::OrdinalIgnoreCase)
You can’t perform that action at this time.
0 commit comments