|
@@ -6,10 +6,7 @@ describe('sample', function()
|
|
it('produces nil values if the sampler fires before the source does', function()
|
|
it('produces nil values if the sampler fires before the source does', function()
|
|
local sampler = Rx.Observable.fromRange(3)
|
|
local sampler = Rx.Observable.fromRange(3)
|
|
local onNext, onError, onCompleted = observableSpy(Rx.Observable.empty():sample(sampler))
|
|
local onNext, onError, onCompleted = observableSpy(Rx.Observable.empty():sample(sampler))
|
|
- expect(#onNext).to.equal(3)
|
|
|
|
- expect(next(onNext[1])).to_not.exist()
|
|
|
|
- expect(next(onNext[2])).to_not.exist()
|
|
|
|
- expect(next(onNext[3])).to_not.exist()
|
|
|
|
|
|
+ expect(#onNext).to.equal(0)
|
|
end)
|
|
end)
|
|
|
|
|
|
it('produces the latest value produced by the source when the sampler fires', function()
|
|
it('produces the latest value produced by the source when the sampler fires', function()
|