@@ -163,18 +163,20 @@ describe('"arr" type', () => {
163163 const system = new ModuleType ( ) ;
164164 const type = system . t . Tuple ( [ t . Const ( 'start' ) ] , t . str ) . tail ( t . Const ( 'end' ) ) ;
165165 const estimator = CapacityEstimatorCodegen . get ( type ) ;
166- expect ( estimator ( [ 'start' , 'middle1' , 'middle2' , 'end' ] ) ) . toBe ( maxEncodingCapacity ( [ 'start' , 'middle1' , 'middle2' , 'end' ] ) ) ;
166+ expect ( estimator ( [ 'start' , 'middle1' , 'middle2' , 'end' ] ) ) . toBe (
167+ maxEncodingCapacity ( [ 'start' , 'middle1' , 'middle2' , 'end' ] ) ,
168+ ) ;
167169 } ) ;
168170
169171 test ( 'complex named tail tuple' , ( ) => {
170172 const system = new ModuleType ( ) ;
171- const type = system . t . Array ( t . num ) . tail (
172- t . Key ( 'status' , t . str ) ,
173- t . Key ( 'timestamp' , t . num ) ,
174- t . Key ( 'metadata' , t . bool )
175- ) ;
173+ const type = system . t
174+ . Array ( t . num )
175+ . tail ( t . Key ( 'status' , t . str ) , t . Key ( 'timestamp' , t . num ) , t . Key ( 'metadata' , t . bool ) ) ;
176176 const estimator = CapacityEstimatorCodegen . get ( type ) ;
177- expect ( estimator ( [ 1 , 2 , 3 , 'success' , 1234567890 , true ] ) ) . toBe ( maxEncodingCapacity ( [ 1 , 2 , 3 , 'success' , 1234567890 , true ] ) ) ;
177+ expect ( estimator ( [ 1 , 2 , 3 , 'success' , 1234567890 , true ] ) ) . toBe (
178+ maxEncodingCapacity ( [ 1 , 2 , 3 , 'success' , 1234567890 , true ] ) ,
179+ ) ;
178180 } ) ;
179181
180182 test ( 'empty array with head/tail definition' , ( ) => {
@@ -186,35 +188,32 @@ describe('"arr" type', () => {
186188
187189 test ( 'head tuple with different types' , ( ) => {
188190 const system = new ModuleType ( ) ;
189- const type = system . t . Tuple ( [
190- t . Key ( 'id' , t . num ) ,
191- t . Key ( 'name' , t . str ) ,
192- t . Key ( 'active' , t . bool )
193- ] , t . str ) ;
191+ const type = system . t . Tuple ( [ t . Key ( 'id' , t . num ) , t . Key ( 'name' , t . str ) , t . Key ( 'active' , t . bool ) ] , t . str ) ;
194192 const estimator = CapacityEstimatorCodegen . get ( type ) ;
195- expect ( estimator ( [ 42 , 'test' , true , 'extra1' , 'extra2' ] ) ) . toBe ( maxEncodingCapacity ( [ 42 , 'test' , true , 'extra1' , 'extra2' ] ) ) ;
193+ expect ( estimator ( [ 42 , 'test' , true , 'extra1' , 'extra2' ] ) ) . toBe (
194+ maxEncodingCapacity ( [ 42 , 'test' , true , 'extra1' , 'extra2' ] ) ,
195+ ) ;
196196 } ) ;
197197
198198 test ( 'tail tuple with different types' , ( ) => {
199199 const system = new ModuleType ( ) ;
200- const type = system . t . Array ( t . str ) . tail (
201- t . Key ( 'count' , t . num ) ,
202- t . Key ( 'valid' , t . bool )
203- ) ;
200+ const type = system . t . Array ( t . str ) . tail ( t . Key ( 'count' , t . num ) , t . Key ( 'valid' , t . bool ) ) ;
204201 const estimator = CapacityEstimatorCodegen . get ( type ) ;
205- expect ( estimator ( [ 'item1' , 'item2' , 'item3' , 5 , true ] ) ) . toBe ( maxEncodingCapacity ( [ 'item1' , 'item2' , 'item3' , 5 , true ] ) ) ;
202+ expect ( estimator ( [ 'item1' , 'item2' , 'item3' , 5 , true ] ) ) . toBe (
203+ maxEncodingCapacity ( [ 'item1' , 'item2' , 'item3' , 5 , true ] ) ,
204+ ) ;
206205 } ) ;
207206
208207 test ( 'nested objects in named tuples' , ( ) => {
209208 const system = new ModuleType ( ) ;
210- const type = system . t . Array ( t . Object ( t . Key ( 'value' , t . num ) ) ) . tail (
211- t . Key ( 'summary' , t . Object ( t . Key ( 'total' , t . num ) , t . Key ( 'average ', t . num ) ) )
212- ) ;
209+ const type = system . t
210+ . Array ( t . Object ( t . Key ( 'value ' , t . num ) ) )
211+ . tail ( t . Key ( 'summary' , t . Object ( t . Key ( 'total' , t . num ) , t . Key ( 'average' , t . num ) ) ) ) ;
213212 const estimator = CapacityEstimatorCodegen . get ( type ) ;
214213 const data = [
215214 { value : 10 } ,
216215 { value : 20 } ,
217- { total : 30 , average : 15 } // summary
216+ { total : 30 , average : 15 } , // summary
218217 ] ;
219218 expect ( estimator ( data ) ) . toBe ( maxEncodingCapacity ( data ) ) ;
220219 } ) ;
0 commit comments