Skip to content

Commit

Permalink
test(dtslint): add dtslint test for sampleTime operator (#4093) (#4339)
Browse files Browse the repository at this point in the history
* test(dtslint): add dtslint test for sampleTime operator (#4093)

* test(dtslint): remove dtslint test with repeated code (#4093)
  • Loading branch information
dkosasih authored and cartant committed Nov 13, 2018
1 parent 0ceccd1 commit de9d2e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec-dtslint/operators/sampleTime-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { of, asyncScheduler } from 'rxjs';
import { sampleTime } from 'rxjs/operators';

it('should enforce period parameter', () => {
const a = of(1, 2, 3).pipe(sampleTime()); // $ExpectError
});

it('should infer correctly', () => {
const a = of(1, 2, 3).pipe(sampleTime(1000)); // $ExpectType Observable<number>
});

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

0 comments on commit de9d2e4

Please sign in to comment.