@@ -242,27 +242,27 @@ suite("stream<T> lifts", () => {
242242 // TODO: test misuse of fixed length list
243243 } ) ;
244244
245- // test.only ("list<record>", async () => {
246- // assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamListRecord, AsyncFunction);
247- // 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" } ]
251- // [],
252- // ];
253- // let stream = await instance["jco:test-components/get-stream-async"].getStreamListRecord(vals);
254- // await checkStreamValues({ stream, vals, typeName: "list<record>", assertEqFn: assert.deepEqual});
255- // });
256-
257- // test.only ("result<string>", async () => {
258- // assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamResultString, AsyncFunction);
259- // let vals = [
260- // ' present string',
261- // null ,
262- // ];
263- // let stream = await instance["jco:test-components/get-stream-async"].getStreamResultString(vals);
264- // await checkStreamValues({ stream, vals, typeName: "result<string>", assertEqFn: assert.deepEqual});
265- // });
245+ test ( "list<record>" , async ( ) => {
246+ assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamListRecord , AsyncFunction ) ;
247+ 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" } ] ,
251+ [ ] ,
252+ ] ;
253+ let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamListRecord ( vals ) ;
254+ await checkStreamValues ( { stream, vals, typeName : "list<record>" , assertEqFn : assert . deepEqual } ) ;
255+ } ) ;
256+
257+ test ( "result<string>" , async ( ) => {
258+ assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamResultString , AsyncFunction ) ;
259+ let vals = [
260+ { tag : 'ok' , val : ' present string' } ,
261+ { tag : 'err' , val : 'nope' } ,
262+ ] ;
263+ let stream = await instance [ "jco:test-components/get-stream-async" ] . getStreamResultString ( vals ) ;
264+ await checkStreamValues ( { stream, vals, typeName : "result<string>" , assertEqFn : assert . deepEqual } ) ;
265+ } ) ;
266266
267267} ) ;
268268
0 commit comments