@@ -186,9 +186,9 @@ suite("stream<T> lifts", () => {
186186 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamFlags , AsyncFunction ) ;
187187
188188 let vals = [
189- { first : true , second : false , third : false } ,
190- { first : false , second : true , third : false } ,
191- { first : false , second : false , third : true } ,
189+ { first : true , second : false , third : false } ,
190+ { first : false , second : true , third : false } ,
191+ { first : false , second : false , third : true } ,
192192 ] ;
193193 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamFlags ( vals ) ;
194194 await checkStreamValues ( { stream, vals, typeName : "flags" , assertEqFn : assert . deepEqual } ) ;
@@ -197,73 +197,75 @@ suite("stream<T> lifts", () => {
197197 test ( "enum" , async ( ) => {
198198 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamEnum , AsyncFunction ) ;
199199
200- let vals = [
201- 'first' ,
202- 'second' ,
203- 'third' ,
204- ] ;
200+ let vals = [ "first" , "second" , "third" ] ;
205201 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamEnum ( vals ) ;
206- await checkStreamValues ( { stream, vals, typeName : "enum" , assertEqFn : assert . deepEqual } ) ;
202+ await checkStreamValues ( { stream, vals, typeName : "enum" , assertEqFn : assert . deepEqual } ) ;
207203 } ) ;
208204
209205 test ( "option<string>" , async ( ) => {
210206 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamOptionString , AsyncFunction ) ;
211207
212- let vals = [
213- 'present string' ,
214- null ,
215- ] ;
208+ let vals = [ "present string" , null ] ;
216209 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamOptionString ( vals ) ;
217- await checkStreamValues ( { stream, vals, typeName : "option<string>" , assertEqFn : assert . deepEqual , expectedValues : [
218- // TODO: wit type representation smoothing mismatch
219- { tag : "some" , val : "present string" } ,
220- { tag : "none" } ,
221- ] } ) ;
210+ await checkStreamValues ( {
211+ stream,
212+ vals,
213+ typeName : "option<string>" ,
214+ assertEqFn : assert . deepEqual ,
215+ expectedValues : [
216+ // TODO: wit type representation smoothing mismatch
217+ { tag : "some" , val : "present string" } ,
218+ { tag : "none" } ,
219+ ] ,
220+ } ) ;
222221 } ) ;
223222
224223 test ( "list<string>" , async ( ) => {
225224 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamListString , AsyncFunction ) ;
226- let vals = [
227- [ 'first' , 'second' , 'third' ] ,
228- [ ] ,
229- ] ;
225+ let vals = [ [ "first" , "second" , "third" ] , [ ] ] ;
230226 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamListString ( vals ) ;
231- await checkStreamValues ( { stream, vals, typeName : "list<string>" , assertEqFn : assert . deepEqual } ) ;
227+ await checkStreamValues ( { stream, vals, typeName : "list<string>" , assertEqFn : assert . deepEqual } ) ;
232228 } ) ;
233229
234230 test ( "list<u32, 5>" , async ( ) => {
235231 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamFixedListU32 , AsyncFunction ) ;
236232 let vals = [
237- [ 1 , 2 , 3 , 4 , 5 ] ,
238- [ 0 , 0 , 0 , 0 , 0 ] ,
233+ [ 1 , 2 , 3 , 4 , 5 ] ,
234+ [ 0 , 0 , 0 , 0 , 0 ] ,
239235 ] ;
240236 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamFixedListU32 ( vals ) ;
241- await checkStreamValues ( { stream, vals, typeName : "list<string>" , assertEqFn : assert . deepEqual } ) ;
237+ await checkStreamValues ( { stream, vals, typeName : "list<string>" , assertEqFn : assert . deepEqual } ) ;
242238 // TODO: test misuse of fixed length list
243239 } ) ;
244240
245241 test ( "list<record>" , async ( ) => {
246242 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamListRecord , AsyncFunction ) ;
247243 let vals = [
248- [ { id : 1 , idStr : "one" } ] ,
249- [ { id : 1 , idStr : "one" } , { id : 2 , idStr : "two" } ] ,
250- [ { id : 1 , idStr : "one" } , { id : 2 , idStr : "two" } , { id : 3 , idStr : "three" } ] ,
244+ [ { id : 1 , idStr : "one" } ] ,
245+ [
246+ { id : 1 , idStr : "one" } ,
247+ { id : 2 , idStr : "two" } ,
248+ ] ,
249+ [
250+ { id : 1 , idStr : "one" } ,
251+ { id : 2 , idStr : "two" } ,
252+ { id : 3 , idStr : "three" } ,
253+ ] ,
251254 [ ] ,
252255 ] ;
253256 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamListRecord ( vals ) ;
254- await checkStreamValues ( { stream, vals, typeName : "list<record>" , assertEqFn : assert . deepEqual } ) ;
257+ await checkStreamValues ( { stream, vals, typeName : "list<record>" , assertEqFn : assert . deepEqual } ) ;
255258 } ) ;
256259
257260 test ( "result<string>" , async ( ) => {
258261 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamResultString , AsyncFunction ) ;
259262 let vals = [
260- { tag : 'ok' , val : ' present string' } ,
261- { tag : ' err' , val : ' nope' } ,
263+ { tag : "ok" , val : " present string" } ,
264+ { tag : " err" , val : " nope" } ,
262265 ] ;
263266 let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamResultString ( vals ) ;
264- await checkStreamValues ( { stream, vals, typeName : "result<string>" , assertEqFn : assert . deepEqual } ) ;
267+ await checkStreamValues ( { stream, vals, typeName : "result<string>" , assertEqFn : assert . deepEqual } ) ;
265268 } ) ;
266-
267269} ) ;
268270
269271async function checkStreamValues ( args ) {
0 commit comments