Skip to content

Commit

Permalink
Merge 773bbf9 into 72d96bb
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Mar 2, 2016
2 parents 72d96bb + 773bbf9 commit bfd9899
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions spec/helpers/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ export function fit(expectation: string, assertion?: (done?: DoneSignature) => v
}
}

export function type(assertion: Function): void {
//intentionally does not execute to avoid unexpected side effect occurs by subscription,
//or infinite source. Suffecient to check build time only.
}

export function lowerCaseO<T>(...args): Rx.Observable<T> {
const values = [].slice.apply(arguments);

Expand Down
10 changes: 9 additions & 1 deletion spec/operators/toArray-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Rx from '../../dist/cjs/Rx';
import {hot, cold, expectObservable, expectSubscriptions} from '../helpers/marble-testing';
import {it, asDiagram} from '../helpers/test-helper';
import {it, asDiagram, type} from '../helpers/test-helper';

const Observable = Rx.Observable;

Expand Down Expand Up @@ -101,4 +101,12 @@ describe('toArray', () => {
expectObservable(e1.toArray()).toBe(expected);
expectSubscriptions(e1.subscriptions).toBe(e1subs);
});

type(() => {
const typeValue = {
val: 3
};

Observable.of(typeValue).toArray().subscribe(x => { x[0].val.toString(); });
});
});

0 comments on commit bfd9899

Please sign in to comment.