Skip to content

Commit

Permalink
test(debounce): add failing scalar selector test
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Jan 19, 2018
1 parent d7cfb42 commit 336847b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/operators/debounce-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ describe('Observable.prototype.debounce', () => {
expectSubscriptions(e1.subscriptions).toBe(e1subs);
});

it('should debounce by scalar selector observable', () => {
const e1 = hot('--a--bc--d----|');
const e1subs = '^ !';
const expected = '--a--bc--d----|';

expectObservable(e1.debounce(() => Rx.Observable.of(0))).toBe(expected);
expectSubscriptions(e1.subscriptions).toBe(e1subs);
});

it('should complete when source does not emit', () => {
const e1 = hot('-----|');
const e1subs = '^ !';
Expand Down

0 comments on commit 336847b

Please sign in to comment.