Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 555 Bytes
import { should } from 'chai'; should();
import source from '../source';
import spread from '../spread';
describe('spread()', () => {
it('should spread an array into separate emissions.', () => {
let r = <number[]>[];
let a = source();
a.to(spread()).subscribe(v => r.push(v));
a.send([1, 2, 3]);
r.should.eql([1, 2, 3]);
});
it('should simply pass on values that are not arrays.', done => {
let a = source();
a.to(spread()).subscribe(v => {
v.should.equal(42);
done();
});
a.send(42);
});
});
You can’t perform that action at this time.