Skip to content

Commit

Permalink
test(dtslint): add dtslint tests for windowCount operator (#4093) (#4367
Browse files Browse the repository at this point in the history
)

* test(dtslint): add dtslint tests for windowCount operator (#4093)

* test(dtslint): add additional dtslint test for windowCount operator (#4093)
  • Loading branch information
nathan-lapinski authored and cartant committed Nov 21, 2018
1 parent 2490957 commit 4439999
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec-dtslint/operators/windowCount-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { of } from 'rxjs';
import { windowCount } from 'rxjs/operators';

it('should infer correctly', () => {
of('test').pipe(windowCount(1)); // $ExpectType Observable<Observable<string>>
of('test').pipe(windowCount(1, 2)); // $ExpectType Observable<Observable<string>>
});

it('should enforce windowSize type', () => {
of(1).pipe(windowCount()); // $ExpectError
of(1).pipe(windowCount('1')); // $ExpectError
});

it('should enforce startEveryWindow type', () => {
of(1).pipe(windowCount(1, '2')); // $ExpectError
});

0 comments on commit 4439999

Please sign in to comment.