|
|
@@ -46,6 +46,21 @@ describe('Source', function () {
|
|
|
)
|
|
|
})
|
|
|
|
|
|
+ it('should run a grouped without flushing an empty array', async () => {
|
|
|
+ await fc.assert(
|
|
|
+ fc.asyncProperty(fc.array(fc.constant(1)), fc.integer(1, 10), async (arr, groupSize) => {
|
|
|
+ await Source.fromArray(arr)
|
|
|
+ .grouped(groupSize)
|
|
|
+ .map(v => {
|
|
|
+ assert.ok(v.length > 0)
|
|
|
+ return v.length
|
|
|
+ })
|
|
|
+ .into(Sink.sum)
|
|
|
+ .run()
|
|
|
+ }),
|
|
|
+ )
|
|
|
+ })
|
|
|
+
|
|
|
it('should run ordered async', async () => {
|
|
|
await fc.assert(
|
|
|
fc.asyncProperty(fc.array(fc.integer()), fc.integer(1, 50), async (arr, concurrencyLevel) => {
|