Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
No unit test exists for ReduceTransform. Two things that I find strange about this class.
(1) It emits `result` for every `onData()`. I think the correct behavior is to emit the `result` after all `onData()`s are called.
(2) When result == null (the first `onData()` call), it does "result = func.call(element, element)", processing the first element twice. I am not sure about this.
I think unit tests would clarify things.