Skip to content

Commit

Permalink
test(all): enable type inference to marble diagram
Browse files Browse the repository at this point in the history
- relates to ReactiveX#1633
  • Loading branch information
kwonoj committed Feb 9, 2017
1 parent 6ce4773 commit 3b14f7d
Show file tree
Hide file tree
Showing 122 changed files with 1,131 additions and 475 deletions.
7 changes: 6 additions & 1 deletion spec/Observable-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import {expect} from 'chai';
import * as sinon from 'sinon';
import * as Rx from '../dist/cjs/Rx';
import {TeardownLogic} from '../dist/cjs/Subscription';
import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram, rxTestScheduler };
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

declare const {asDiagram, expectObservable, rxTestScheduler};
const Subscriber = Rx.Subscriber;
const Observable = Rx.Observable;

Expand Down
5 changes: 4 additions & 1 deletion spec/Subject-spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {expect} from 'chai';
import * as Rx from '../dist/cjs/Rx';
import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const {hot, expectObservable};
declare const { time };
declare const hot: typeof marbleTestingSignature.hot;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;

const Subject = Rx.Subject;
const Observable = Rx.Observable;
Expand Down
5 changes: 4 additions & 1 deletion spec/observables/SubscribeOnObservable-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import {expect} from 'chai';
import * as sinon from 'sinon';
import * as Rx from '../../dist/cjs/Rx';
import {SubscribeOnObservable} from '../../dist/cjs/observable/SubscribeOnObservable';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const {hot, expectObservable, expectSubscriptions};
declare const hot: typeof marbleTestingSignature.hot;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;
declare const rxTestScheduler: Rx.TestScheduler;

describe('SubscribeOnObservable', () => {
Expand Down
8 changes: 7 additions & 1 deletion spec/observables/combineLatest-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, expectObservable, expectSubscriptions, type};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { type };
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;
const queueScheduler = Rx.Scheduler.queue;
Expand Down
7 changes: 6 additions & 1 deletion spec/observables/concat-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;
const queueScheduler = Rx.Scheduler.queue;
Expand Down
8 changes: 7 additions & 1 deletion spec/observables/defer-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

Expand Down
5 changes: 4 additions & 1 deletion spec/observables/empty-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;

const Observable = Rx.Observable;

Expand Down
5 changes: 4 additions & 1 deletion spec/observables/fromEvent-spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const rxTestScheduler: Rx.TestScheduler;
declare const {hot, asDiagram, expectObservable, expectSubscriptions};

const Observable = Rx.Observable;

/** @test {fromEvent} */
Expand Down
5 changes: 4 additions & 1 deletion spec/observables/fromEventPattern-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import {expect} from 'chai';
import * as sinon from 'sinon';
import * as Rx from '../../dist/cjs/Rx';
import {noop} from '../../dist/cjs/util/noop';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;

declare const rxTestScheduler: Rx.TestScheduler;
declare const {hot, asDiagram, expectObservable, expectSubscriptions};
const Observable = Rx.Observable;

/** @test {fromEventPattern} */
Expand Down
3 changes: 3 additions & 0 deletions spec/observables/if-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const expectObservable: typeof marbleTestingSignature.expectObservable;

const Observable = Rx.Observable;

Expand Down
5 changes: 4 additions & 1 deletion spec/observables/interval-spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {expect} from 'chai';
import * as sinon from 'sinon';
import * as Rx from '../../dist/cjs/Rx';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;

declare const {hot, asDiagram, expectObservable, expectSubscriptions};
declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;
const asap = Rx.Scheduler.asap;
Expand Down
7 changes: 6 additions & 1 deletion spec/observables/merge-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;
Expand Down
5 changes: 4 additions & 1 deletion spec/observables/never-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;

const Observable = Rx.Observable;

Expand Down
4 changes: 3 additions & 1 deletion spec/observables/of-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import * as Rx from '../../dist/cjs/Rx';
import {ArrayObservable} from '../../dist/cjs/observable/ArrayObservable';
import {ScalarObservable} from '../../dist/cjs/observable/ScalarObservable';
import {EmptyObservable} from '../../dist/cjs/observable/EmptyObservable';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const {hot, asDiagram, expectObservable, expectSubscriptions};
declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;

Expand Down
7 changes: 6 additions & 1 deletion spec/observables/onErrorResumeNext-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

Expand Down
4 changes: 3 additions & 1 deletion spec/observables/pairs-spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const {hot, asDiagram, expectObservable, expectSubscriptions};
declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;

Expand Down
7 changes: 6 additions & 1 deletion spec/observables/race-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

Expand Down
5 changes: 4 additions & 1 deletion spec/observables/range-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import {expect} from 'chai';
import * as sinon from 'sinon';
import * as Rx from '../../dist/cjs/Rx';
import {RangeObservable} from '../../dist/cjs/observable/RangeObservable';
declare const {hot, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;

declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;
Expand Down
5 changes: 4 additions & 1 deletion spec/observables/throw-spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, asDiagram, expectObservable, expectSubscriptions};
import {ErrorObservable} from '../../dist/cjs/observable/ErrorObservable';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;

Expand Down
5 changes: 4 additions & 1 deletion spec/observables/timer-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import * as Rx from '../../dist/cjs/Rx';

declare const {hot, asDiagram, time, expectObservable};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram, time };
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const rxTestScheduler: Rx.TestScheduler;

const Observable = Rx.Observable;
Expand Down
8 changes: 7 additions & 1 deletion spec/observables/zip-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, expectObservable, expectSubscriptions, type};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { type };
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

declare const Symbol: any;

Expand Down
8 changes: 7 additions & 1 deletion spec/operators/audit-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

Expand Down
8 changes: 7 additions & 1 deletion spec/operators/auditTime-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import {expect} from 'chai';
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

declare const rxTestScheduler: Rx.TestScheduler;
const Observable = Rx.Observable;
Expand Down
7 changes: 6 additions & 1 deletion spec/operators/buffer-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const hot: typeof marbleTestingSignature.hot;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

Expand Down
Loading

0 comments on commit 3b14f7d

Please sign in to comment.