@@ -136,6 +136,48 @@ describe('Unit - get', () => {
136136 [ { stage_id : 1 , round_id : 100 , status : Status . Completed } , { stage_id : 2 , round_id : 0 , status : Status . Completed } , { stage_id : 2 , round_id : 1 , status : Status . Completed } ] ,
137137 [ ] ,
138138 ] ,
139+ [
140+ 'one stage - initial state' ,
141+ { id : 2 , type : 'single_elimination' , settings : { size : 4 } } ,
142+ [ { stage_id : 2 , group_id : 0 , id : 0 } , { stage_id : 2 , group_id : 0 , id : 1 } , { stage_id : 2 , group_id : 1 , id : 2 } ] ,
143+ [ { stage_id : 2 , round_id : 0 , status : Status . Ready } , { stage_id : 2 , round_id : 0 , status : Status . Ready } , { stage_id : 2 , round_id : 1 , status : Status . Locked } , { stage_id : 2 , round_id : 2 , status : Status . Locked } ] ,
144+ [ { stage_id : 2 , round_id : 0 , status : Status . Ready } , { stage_id : 2 , round_id : 0 , status : Status . Ready } ] ,
145+ ] ,
146+ [
147+ 'one stage - matches of 1st round completed and 2nd round ready' ,
148+ { id : 2 , type : 'single_elimination' , settings : { size : 4 } } ,
149+ [ { stage_id : 2 , group_id : 0 , id : 0 } , { stage_id : 2 , group_id : 0 , id : 1 } , { stage_id : 2 , group_id : 1 , id : 2 } ] ,
150+ [ { stage_id : 2 , round_id : 0 , status : Status . Completed } , { stage_id : 2 , round_id : 0 , status : Status . Completed } , { stage_id : 2 , round_id : 1 , status : Status . Ready } , { stage_id : 2 , round_id : 2 , status : Status . Locked } ] ,
151+ [ { stage_id : 2 , round_id : 1 , status : Status . Ready } ] ,
152+ ] ,
153+ [
154+ 'one stage - matches of 1st round completed and 2nd round running' ,
155+ { id : 2 , type : 'single_elimination' , settings : { size : 4 } } ,
156+ [ { stage_id : 2 , group_id : 0 , id : 0 } , { stage_id : 2 , group_id : 0 , id : 1 } , { stage_id : 2 , group_id : 1 , id : 2 } ] ,
157+ [ { stage_id : 2 , round_id : 0 , status : Status . Archived } , { stage_id : 2 , round_id : 0 , status : Status . Archived } , { stage_id : 2 , round_id : 1 , status : Status . Running } , { stage_id : 2 , round_id : 2 , status : Status . Locked } ] ,
158+ [ { stage_id : 2 , round_id : 1 , status : Status . Running } ] ,
159+ ] ,
160+ [
161+ 'one stage, with consolation final - initial state' ,
162+ { id : 2 , type : 'single_elimination' , settings : { size : 4 , consolationFinal : true } } ,
163+ [ { stage_id : 2 , group_id : 0 , id : 0 } , { stage_id : 2 , group_id : 0 , id : 1 } , { stage_id : 2 , group_id : 1 , id : 2 } ] ,
164+ [ { stage_id : 2 , round_id : 0 , status : Status . Ready } , { stage_id : 2 , round_id : 0 , status : Status . Ready } , { stage_id : 2 , round_id : 1 , status : Status . Locked } , { stage_id : 2 , round_id : 2 , status : Status . Locked } ] ,
165+ [ { stage_id : 2 , round_id : 0 , status : Status . Ready } , { stage_id : 2 , round_id : 0 , status : Status . Ready } ] ,
166+ ] ,
167+ [
168+ 'one stage, with consolation final - matches of 1st round completed and 2nd round ready' ,
169+ { id : 2 , type : 'single_elimination' , settings : { size : 4 , consolationFinal : true } } ,
170+ [ { stage_id : 2 , group_id : 0 , id : 0 } , { stage_id : 2 , group_id : 0 , id : 1 } , { stage_id : 2 , group_id : 1 , id : 2 } ] ,
171+ [ { stage_id : 2 , round_id : 0 , status : Status . Completed } , { stage_id : 2 , round_id : 0 , status : Status . Completed } , { stage_id : 2 , round_id : 1 , status : Status . Ready } , { stage_id : 2 , round_id : 2 , status : Status . Locked } ] ,
172+ [ { stage_id : 2 , round_id : 1 , status : Status . Ready } ] ,
173+ ] ,
174+ [
175+ 'one stage, with consolation final - matches of 1st round completed and 2nd round running' ,
176+ { id : 2 , type : 'single_elimination' , settings : { size : 4 , consolationFinal : true } } ,
177+ [ { stage_id : 2 , group_id : 0 , id : 0 } , { stage_id : 2 , group_id : 0 , id : 1 } , { stage_id : 2 , group_id : 1 , id : 2 } ] ,
178+ [ { stage_id : 2 , round_id : 0 , status : Status . Archived } , { stage_id : 2 , round_id : 0 , status : Status . Archived } , { stage_id : 2 , round_id : 1 , status : Status . Running } , { stage_id : 2 , round_id : 2 , status : Status . Locked } ] ,
179+ [ { stage_id : 2 , round_id : 1 , status : Status . Running } ] ,
180+ ] ,
139181 [
140182 'one stage, with consolation final - both finals running' ,
141183 { id : 2 , type : 'single_elimination' , settings : { size : 4 , consolationFinal : true } } ,
0 commit comments