Skip to content

Commit

Permalink
test(dtslint): add dtslint test for endWith operator (#4093)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkosasih committed Sep 24, 2018
1 parent 02780dd commit 55925d4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions spec-dtslint/operators/endWith-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { of, asyncScheduler } from 'rxjs';
import { endWith } from 'rxjs/operators';

it('should support a scheduler', () => {
const a = of(1, 2, 3).pipe(endWith(asyncScheduler)); // $ExpectType Observable<number>
});

it('should infer type for 1 parameter', () => {
const a = of(1, 2, 3).pipe(endWith(4)); // $ExpectType Observable<number>
});

it('should infer type for 2 parameter', () => {
const a = of(1, 2, 3).pipe(endWith(4, 5)); // $ExpectType Observable<number>
});

it('should infer type for 3 parameter', () => {
const a = of(1, 2, 3).pipe(endWith(4, 5, 6)); // $ExpectType Observable<number>
});

it('should infer type for 4 parameter', () => {
const a = of(1, 2, 3).pipe(endWith(4, 5, 6, 7)); // $ExpectType Observable<number>
});

it('should infer type for 5 parameter', () => {
const a = of(1, 2, 3).pipe(endWith(4, 5, 6, 7, 8)); // $ExpectType Observable<number>
});

it('should infer type for 6 parameter', () => {
const a = of(1, 2, 3).pipe(endWith(4, 5, 6, 7, 8, 9)); // $ExpectType Observable<number>
});

it('should infer type for rest parameters', () => {
const a = of(1, 2, 3).pipe(endWith(4, 5, 6, 7, 8, 9, 10)); // $ExpectType Observable<number>
});

0 comments on commit 55925d4

Please sign in to comment.