Skip to content

Commit

Permalink
feat(reorganize): hid testing implementation details
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `HotObservable` and `ColdObservable`, and other testing support types are no longer exported directly.
  • Loading branch information
benlesh committed Jan 12, 2018
1 parent 810c4d0 commit b981666
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 23 deletions.
8 changes: 4 additions & 4 deletions spec/helpers/marble-testing.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Observable } from '../../src/Observable';
import { SubscriptionLog } from '../../src/testing/SubscriptionLog';
import { ColdObservable } from '../../src/testing/ColdObservable';
import { HotObservable } from '../../src/testing/HotObservable';
import { TestScheduler, observableToBeFn, subscriptionLogsToBeFn } from '../../src/testing/TestScheduler';
import { SubscriptionLog } from '../../src/internal/testing/SubscriptionLog';
import { ColdObservable } from '../../src/internal/testing/ColdObservable';
import { HotObservable } from '../../src/internal/testing/HotObservable';
import { TestScheduler, observableToBeFn, subscriptionLogsToBeFn } from '../../src/internal/testing/TestScheduler';

declare const global: any;

Expand Down
2 changes: 1 addition & 1 deletion spec/observables/generate-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Rx from '../../src/Rx';
import '../../src/add/observable/generate';
import { TestScheduler } from '../../src/testing/TestScheduler';
import { TestScheduler } from '../../src/internal/testing/TestScheduler';
import { expect } from 'chai';
declare const {asDiagram, expectObservable};
declare const rxTestScheduler: TestScheduler;
Expand Down
2 changes: 1 addition & 1 deletion spec/subjects/ReplaySubject-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import * as Rx from '../../src/Rx';
import { TestScheduler } from '../../src/testing/TestScheduler';
import { TestScheduler } from '../../src/internal/testing/TestScheduler';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const hot: typeof marbleTestingSignature.hot;
Expand Down
8 changes: 8 additions & 0 deletions spec/testing/index-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as index from '../../src/testing/index';
import { expect } from 'chai';

describe('index', () => {
it('should export TestScheduler', () => {
expect(index.TestScheduler).to.exist;
});
});
2 changes: 1 addition & 1 deletion src/Rx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export {TimeoutError} from './util/TimeoutError';
export {UnsubscriptionError} from './util/UnsubscriptionError';
export {TimeInterval} from './internal/patching/operator/timeInterval';
export {Timestamp} from './internal/operators/timestamp';
export {TestScheduler} from './testing/TestScheduler';
export {TestScheduler} from './internal/testing/TestScheduler';
export {VirtualTimeScheduler} from './internal/scheduler/VirtualTimeScheduler';
export {AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError} from './internal/observable/dom/AjaxObservable';
export { pipe } from './util/pipe';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Observable } from '../internal/Observable';
import { Subscription } from '../internal/Subscription';
import { Scheduler } from '../internal/Scheduler';
import { Observable } from '../Observable';
import { Subscription } from '../Subscription';
import { Scheduler } from '../Scheduler';
import { TestMessage } from './TestMessage';
import { SubscriptionLog } from './SubscriptionLog';
import { SubscriptionLoggable } from './SubscriptionLoggable';
import { applyMixins } from '../util/applyMixins';
import { Subscriber } from '../internal/Subscriber';
import { applyMixins } from '../../util/applyMixins';
import { Subscriber } from '../Subscriber';

/**
* We need this JSDoc comment for affecting ESDoc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Subject } from '../internal/Subject';
import { Subscriber } from '../internal/Subscriber';
import { Subscription } from '../internal/Subscription';
import { Scheduler } from '../internal/Scheduler';
import { Subject } from '../Subject';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { Scheduler } from '../Scheduler';
import { TestMessage } from './TestMessage';
import { SubscriptionLog } from './SubscriptionLog';
import { SubscriptionLoggable } from './SubscriptionLoggable';
import { applyMixins } from '../util/applyMixins';
import { applyMixins } from '../../util/applyMixins';

/**
* We need this JSDoc comment for affecting ESDoc.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Scheduler } from '../internal/Scheduler';
import { Scheduler } from '../Scheduler';
import { SubscriptionLog } from './SubscriptionLog';

export class SubscriptionLoggable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Notification } from '../internal/Notification';
import { Notification } from '../Notification';

export interface TestMessage {
frame: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Observable } from '../internal/Observable';
import { Notification } from '../internal/Notification';
import { Observable } from '../Observable';
import { Notification } from '../Notification';
import { ColdObservable } from './ColdObservable';
import { HotObservable } from './HotObservable';
import { TestMessage } from './TestMessage';
import { SubscriptionLog } from './SubscriptionLog';
import { Subscription } from '../internal/Subscription';
import { VirtualTimeScheduler, VirtualAction } from '../internal/scheduler/VirtualTimeScheduler';
import { Subscription } from '../Subscription';
import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler';

const defaultMaxFrame: number = 750;

Expand Down
1 change: 1 addition & 0 deletions src/testing/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { TestScheduler } from '../internal/testing/TestScheduler';

0 comments on commit b981666

Please sign in to comment.