RxLua/tests/sum.lua

10 lines
296 B
Lua

describe('sum', function()
it('passes through errors from the source', function()
expect(Rx.Observable.throw():sum()).to.produce.error()
end)
it('produces the sum of the numeric values from the source', function()
expect(Rx.Observable.fromRange(3):sum()).to.produce(6)
end)
end)