@@ -78,6 +78,8 @@ describe('BatchProcessor', () => {
78
78
} )
79
79
80
80
let { workflow } = await seneca . post ( 'aim:foo,color:red' )
81
+
82
+
81
83
out = await process ( workflow , ctx , out )
82
84
83
85
await wait ( 111 )
@@ -104,6 +106,7 @@ describe('BatchProcessor', () => {
104
106
}
105
107
]
106
108
} ) )
109
+ expect ( workflow . run ) . toBeInstanceOf ( Function )
107
110
108
111
expect ( ctx . result$ ) . toEqual ( [
109
112
{
@@ -225,6 +228,9 @@ describe('BatchProcessor', () => {
225
228
}
226
229
]
227
230
} ) )
231
+ expect ( workflow . run ) . toBeInstanceOf ( Function )
232
+ // NOTE: Workflow can be processed via run but "process" below is recommeded since json can't serialize functions
233
+ // out = await workflow.run()
228
234
229
235
out = await process ( workflow , ctx , out )
230
236
@@ -254,6 +260,7 @@ describe('BatchProcessor', () => {
254
260
}
255
261
}
256
262
] )
263
+
257
264
expect ( out . run ) . toBeDefined ( )
258
265
expect ( out . batch ) . toBeDefined ( )
259
266
@@ -308,6 +315,7 @@ describe('BatchProcessor', () => {
308
315
}
309
316
]
310
317
} ) )
318
+ expect ( workflow . run ) . toBeInstanceOf ( Function )
311
319
312
320
out = await process ( workflow , ctx , out )
313
321
@@ -374,6 +382,7 @@ describe('BatchProcessor', () => {
374
382
} ,
375
383
send : [ ]
376
384
} ) )
385
+ expect ( workflow . run ) . toBeInstanceOf ( Function )
377
386
378
387
/// OR, INSTEAD OF run: out = await process(workflow, ctx, out)
379
388
0 commit comments