From a959806cf933db207f7d8989875539f6125b6d70 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 22 Sep 2017 22:38:18 -0700 Subject: [PATCH 1/8] refactor(spec): import module from source directly --- spec/Notification-spec.ts | 5 +- spec/Observable-spec.ts | 12 +++-- spec/Scheduler-spec.ts | 2 +- spec/Subject-spec.ts | 2 +- spec/Subscriber-spec.ts | 2 +- spec/Subscription-spec.ts | 2 +- spec/exports-spec.ts | 52 +++++++++---------- spec/helpers/ambient.d.ts | 12 ----- spec/helpers/marble-testing.ts | 10 ++-- spec/helpers/test-helper.ts | 39 +++++++------- spec/helpers/testScheduler-ui.ts | 52 ++++++++++--------- spec/observables/IteratorObservable-spec.ts | 6 +-- spec/observables/ScalarObservable-spec.ts | 4 +- .../observables/SubscribeOnObservable-spec.ts | 4 +- spec/observables/bindCallback-spec.ts | 2 +- spec/observables/bindNodeCallback-spec.ts | 2 +- spec/observables/combineLatest-spec.ts | 2 +- spec/observables/concat-spec.ts | 2 +- spec/observables/defer-spec.ts | 2 +- spec/observables/dom/ajax-spec.ts | 4 +- spec/observables/dom/webSocket-spec.ts | 2 +- spec/observables/empty-spec.ts | 2 +- spec/observables/forkJoin-spec.ts | 2 +- spec/observables/from-promise-spec.ts | 2 +- spec/observables/from-spec.ts | 2 +- spec/observables/fromEvent-spec.ts | 2 +- spec/observables/fromEventPattern-spec.ts | 4 +- spec/observables/generate-spec.ts | 6 +-- spec/observables/if-spec.ts | 2 +- spec/observables/interval-spec.ts | 2 +- spec/observables/merge-spec.ts | 2 +- spec/observables/never-spec.ts | 2 +- spec/observables/of-spec.ts | 8 +-- spec/observables/onErrorResumeNext-spec.ts | 2 +- spec/observables/pairs-spec.ts | 2 +- spec/observables/race-spec.ts | 2 +- spec/observables/range-spec.ts | 4 +- spec/observables/throw-spec.ts | 4 +- spec/observables/timer-spec.ts | 2 +- spec/observables/using-spec.ts | 2 +- spec/observables/zip-spec.ts | 2 +- spec/operators/audit-spec.ts | 2 +- spec/operators/auditTime-spec.ts | 2 +- spec/operators/buffer-spec.ts | 2 +- spec/operators/bufferCount-spec.ts | 2 +- spec/operators/bufferTime-spec.ts | 2 +- spec/operators/bufferToggle-spec.ts | 2 +- spec/operators/bufferWhen-spec.ts | 2 +- spec/operators/catch-spec.ts | 2 +- spec/operators/combineAll-spec.ts | 2 +- spec/operators/combineLatest-spec.ts | 2 +- spec/operators/concat-spec.ts | 2 +- spec/operators/concatAll-spec.ts | 2 +- spec/operators/concatMap-spec.ts | 2 +- spec/operators/concatMapTo-spec.ts | 2 +- spec/operators/count-spec.ts | 2 +- spec/operators/debounce-spec.ts | 2 +- spec/operators/debounceTime-spec.ts | 2 +- spec/operators/defaultIfEmpty-spec.ts | 2 +- spec/operators/delay-spec.ts | 2 +- spec/operators/delayWhen-spec.ts | 2 +- spec/operators/dematerialize-spec.ts | 2 +- spec/operators/distinct-spec.ts | 2 +- spec/operators/distinctUntilChanged-spec.ts | 2 +- .../operators/distinctUntilKeyChanged-spec.ts | 2 +- spec/operators/do-spec.ts | 2 +- spec/operators/elementAt-spec.ts | 2 +- spec/operators/every-spec.ts | 2 +- spec/operators/exhaust-spec.ts | 2 +- spec/operators/exhaustMap-spec.ts | 2 +- spec/operators/expand-spec.ts | 2 +- spec/operators/filter-spec.ts | 2 +- spec/operators/finally-spec.ts | 2 +- spec/operators/find-spec.ts | 2 +- spec/operators/findIndex-spec.ts | 2 +- spec/operators/first-spec.ts | 2 +- spec/operators/groupBy-spec.ts | 4 +- spec/operators/ignoreElements-spec.ts | 2 +- spec/operators/isEmpty-spec.ts | 2 +- spec/operators/last-spec.ts | 2 +- spec/operators/let-spec.ts | 2 +- spec/operators/map-spec.ts | 2 +- spec/operators/mapTo-spec.ts | 2 +- spec/operators/materialize-spec.ts | 2 +- spec/operators/max-spec.ts | 2 +- spec/operators/merge-spec.ts | 2 +- spec/operators/mergeAll-spec.ts | 2 +- spec/operators/mergeMap-spec.ts | 2 +- spec/operators/mergeMapTo-spec.ts | 2 +- spec/operators/mergeScan-spec.ts | 2 +- spec/operators/min-spec.ts | 2 +- spec/operators/multicast-spec.ts | 2 +- spec/operators/observeOn-spec.ts | 2 +- spec/operators/onErrorResumeNext-spec.ts | 2 +- spec/operators/partition-spec.ts | 2 +- spec/operators/pluck-spec.ts | 2 +- spec/operators/publish-spec.ts | 2 +- spec/operators/publishBehavior-spec.ts | 2 +- spec/operators/publishLast-spec.ts | 2 +- spec/operators/publishReplay-spec.ts | 2 +- spec/operators/race-spec.ts | 2 +- spec/operators/reduce-spec.ts | 2 +- spec/operators/refCount-spec.ts | 2 +- spec/operators/repeat-spec.ts | 2 +- spec/operators/repeatWhen-spec.ts | 2 +- spec/operators/retry-spec.ts | 2 +- spec/operators/retryWhen-spec.ts | 2 +- spec/operators/sample-spec.ts | 2 +- spec/operators/sampleTime-spec.ts | 2 +- spec/operators/scan-spec.ts | 2 +- spec/operators/share-spec.ts | 2 +- spec/operators/shareReplay-spec.ts | 2 +- spec/operators/single-spec.ts | 2 +- spec/operators/skip-spec.ts | 2 +- spec/operators/skipLast-spec.ts | 2 +- spec/operators/skipUntil-spec.ts | 2 +- spec/operators/skipWhile-spec.ts | 2 +- spec/operators/startWith-spec.ts | 2 +- spec/operators/subscribeOn-spec.ts | 2 +- spec/operators/switch-spec.ts | 2 +- spec/operators/switchMap-spec.ts | 2 +- spec/operators/switchMapTo-spec.ts | 2 +- spec/operators/take-spec.ts | 2 +- spec/operators/takeLast-spec.ts | 2 +- spec/operators/takeUntil-spec.ts | 2 +- spec/operators/takeWhile-spec.ts | 2 +- spec/operators/throttle-spec.ts | 2 +- spec/operators/throttleTime-spec.ts | 2 +- spec/operators/timeInterval-spec.ts | 2 +- spec/operators/timeout-spec.ts | 2 +- spec/operators/timeoutWith-spec.ts | 2 +- spec/operators/timestamp-spec.ts | 2 +- spec/operators/toArray-spec.ts | 2 +- spec/operators/toPromise-spec.ts | 2 +- spec/operators/window-spec.ts | 2 +- spec/operators/windowCount-spec.ts | 2 +- spec/operators/windowTime-spec.ts | 2 +- spec/operators/windowToggle-spec.ts | 2 +- spec/operators/windowWhen-spec.ts | 2 +- spec/operators/withLatestFrom-spec.ts | 2 +- spec/operators/zip-spec.ts | 2 +- spec/operators/zipAll-spec.ts | 2 +- spec/root-module-spec.ts | 2 +- .../AnimationFrameScheduler-spec.ts | 2 +- spec/schedulers/AsapScheduler-spec.ts | 2 +- spec/schedulers/QueueScheduler-spec.ts | 2 +- spec/schedulers/TestScheduler-spec.ts | 2 +- spec/schedulers/VirtualTimeScheduler-spec.ts | 4 +- spec/subjects/AsyncSubject-spec.ts | 2 +- spec/subjects/BehaviorSubject-spec.ts | 2 +- spec/subjects/ReplaySubject-spec.ts | 4 +- spec/support/debug.opts | 12 ----- spec/support/default.opts | 4 +- spec/symbol/iterator-spec.ts | 2 +- spec/symbol/observable-polyfilled-spec.ts | 2 +- spec/symbol/observable-spec.ts | 4 +- spec/symbol/rxSubscriber-spec.ts | 4 +- spec/util/FastMap-spec.ts | 2 +- spec/util/Immediate-spec.ts | 4 +- spec/util/MapPolyfill-spec.ts | 2 +- spec/util/Set-spec.ts | 2 +- spec/util/UnsubscriptionError-spec.ts | 2 +- spec/util/assign-spec.ts | 6 +-- spec/util/pipe-spec.ts | 2 +- spec/util/root-spec.ts | 2 +- spec/util/subscribeToResult-spec.ts | 12 ++--- spec/util/toSubscriber-spec.ts | 2 +- 167 files changed, 276 insertions(+), 290 deletions(-) delete mode 100644 spec/helpers/ambient.d.ts delete mode 100644 spec/support/debug.opts diff --git a/spec/Notification-spec.ts b/spec/Notification-spec.ts index b92b504d59..faeb92d2ff 100644 --- a/spec/Notification-spec.ts +++ b/spec/Notification-spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; -import * as Rx from '../dist/package/Rx'; +import * as Rx from '../src/Rx'; +import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports -declare const expectObservable; +declare const expectObservable: typeof marbleTestingSignature.expectObservable; const Notification = Rx.Notification; /** @test {Notification} */ diff --git a/spec/Observable-spec.ts b/spec/Observable-spec.ts index 16bdad8f6d..9d3d7590fb 100644 --- a/spec/Observable-spec.ts +++ b/spec/Observable-spec.ts @@ -1,11 +1,13 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../dist/package/Rx'; -import { TeardownLogic } from '../dist/package/Subscription'; +import * as Rx from '../src/Rx'; +import { TeardownLogic } from '../src/Subscription'; import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports -import { map } from '../dist/package/operators/map'; +import { map } from '../src/operators/map'; +//tslint:disable-next-line +require('./helpers/test-helper'); -declare const { asDiagram, rxTestScheduler }; +declare const asDiagram: any, rxTestScheduler: any; declare const cold: typeof marbleTestingSignature.cold; declare const expectObservable: typeof marbleTestingSignature.expectObservable; declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; @@ -15,7 +17,7 @@ const Observable = Rx.Observable; declare const __root__: any; -function expectFullObserver(val) { +function expectFullObserver(val: any) { expect(val).to.be.a('object'); expect(val.next).to.be.a('function'); expect(val.error).to.be.a('function'); diff --git a/spec/Scheduler-spec.ts b/spec/Scheduler-spec.ts index d3eec8cc05..4dff8e3ac7 100644 --- a/spec/Scheduler-spec.ts +++ b/spec/Scheduler-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../dist/package/Rx'; +import * as Rx from '../src/Rx'; const Scheduler = Rx.Scheduler; diff --git a/spec/Subject-spec.ts b/spec/Subject-spec.ts index 938c5f768f..8bc1e19d19 100644 --- a/spec/Subject-spec.ts +++ b/spec/Subject-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../dist/package/Rx'; +import * as Rx from '../src/Rx'; import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { time }; diff --git a/spec/Subscriber-spec.ts b/spec/Subscriber-spec.ts index 68fa76547c..cd2d13e18c 100644 --- a/spec/Subscriber-spec.ts +++ b/spec/Subscriber-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../dist/package/Rx'; +import * as Rx from '../src/Rx'; const Subscriber = Rx.Subscriber; diff --git a/spec/Subscription-spec.ts b/spec/Subscription-spec.ts index 2bc6a69b10..4fc0cd015f 100644 --- a/spec/Subscription-spec.ts +++ b/spec/Subscription-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../dist/package/Rx'; +import * as Rx from '../src/Rx'; const Observable = Rx.Observable; const Subscription = Rx.Subscription; diff --git a/spec/exports-spec.ts b/spec/exports-spec.ts index d8276328cf..1e481295c6 100644 --- a/spec/exports-spec.ts +++ b/spec/exports-spec.ts @@ -1,29 +1,29 @@ import { expect } from 'chai'; -import { bindCallback } from '../dist/package/observable/bindCallback'; -import { bindNodeCallback } from '../dist/package/observable/bindNodeCallback'; -import { combineLatest } from '../dist/package/observable/combineLatest'; -import { concat } from '../dist/package/observable/concat'; -import { defer } from '../dist/package/observable/defer'; -import { empty } from '../dist/package/observable/empty'; -import { forkJoin } from '../dist/package/observable/forkJoin'; -import { from } from '../dist/package/observable/from'; -import { fromEvent } from '../dist/package/observable/fromEvent'; -import { fromEventPattern } from '../dist/package/observable/fromEventPattern'; -import { fromPromise } from '../dist/package/observable/fromPromise'; -import { _if } from '../dist/package/observable/if'; -import { interval } from '../dist/package/observable/interval'; -import { merge } from '../dist/package/observable/merge'; -import { never } from '../dist/package/observable/never'; -import { of } from '../dist/package/observable/of'; -import { onErrorResumeNext } from '../dist/package/observable/onErrorResumeNext'; -import { pairs } from '../dist/package/observable/pairs'; -import { race } from '../dist/package/observable/race'; -import { range } from '../dist/package/observable/range'; -import { _throw } from '../dist/package/observable/throw'; -import { timer } from '../dist/package/observable/timer'; -import { using } from '../dist/package/observable/using'; -import { zip } from '../dist/package/observable/zip'; -import * as Rx from '../dist/package/Rx'; +import { bindCallback } from '../src/observable/bindCallback'; +import { bindNodeCallback } from '../src/observable/bindNodeCallback'; +import { combineLatest } from '../src/observable/combineLatest'; +import { concat } from '../src/observable/concat'; +import { defer } from '../src/observable/defer'; +import { empty } from '../src/observable/empty'; +import { forkJoin } from '../src/observable/forkJoin'; +import { from } from '../src/observable/from'; +import { fromEvent } from '../src/observable/fromEvent'; +import { fromEventPattern } from '../src/observable/fromEventPattern'; +import { fromPromise } from '../src/observable/fromPromise'; +import { _if } from '../src/observable/if'; +import { interval } from '../src/observable/interval'; +import { merge } from '../src/observable/merge'; +import { never } from '../src/observable/never'; +import { of } from '../src/observable/of'; +import { onErrorResumeNext } from '../src/observable/onErrorResumeNext'; +import { pairs } from '../src/observable/pairs'; +import { race } from '../src/observable/race'; +import { range } from '../src/observable/range'; +import { _throw } from '../src/observable/throw'; +import { timer } from '../src/observable/timer'; +import { using } from '../src/observable/using'; +import { zip } from '../src/observable/zip'; +import * as Rx from '../src/Rx'; describe('exports', () => { it('should have rxjs/observable/bindCallback', () => { @@ -121,4 +121,4 @@ describe('exports', () => { it('should have rxjs/observable/zip', () => { expect(zip).to.equal(Rx.Observable.zip); }); -}); +}); \ No newline at end of file diff --git a/spec/helpers/ambient.d.ts b/spec/helpers/ambient.d.ts deleted file mode 100644 index 3956841d80..0000000000 --- a/spec/helpers/ambient.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -//ambient declarations to allow modules do not have type definition -declare module 'mocha/lib/interfaces/common' { -} - -declare module 'escape-string-regexp' { -} - -declare module 'mocha/lib/suite' { -} - -declare module 'mocha/lib/test' { -} \ No newline at end of file diff --git a/spec/helpers/marble-testing.ts b/spec/helpers/marble-testing.ts index e00b046780..1589bb2941 100644 --- a/spec/helpers/marble-testing.ts +++ b/spec/helpers/marble-testing.ts @@ -1,9 +1,9 @@ /// -import { Observable } from '../../dist/package/Observable'; -import { SubscriptionLog } from '../../dist/package/testing/SubscriptionLog'; -import { ColdObservable } from '../../dist/package/testing/ColdObservable'; -import { HotObservable } from '../../dist/package/testing/HotObservable'; -import { TestScheduler, observableToBeFn, subscriptionLogsToBeFn } from '../../dist/package/testing/TestScheduler'; +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'; declare const global: any; diff --git a/spec/helpers/test-helper.ts b/spec/helpers/test-helper.ts index 1e46ef0da1..24a8626348 100644 --- a/spec/helpers/test-helper.ts +++ b/spec/helpers/test-helper.ts @@ -1,16 +1,17 @@ /// declare const global: any; -import * as Rx from '../../dist/package/Rx'; -import { ObservableInput } from '../../dist/package/Observable'; -import { root } from '../../dist/package/util/root'; -import {$$iterator} from '../../dist/package/symbol/iterator'; +import * as Rx from '../../src/Rx'; +import { ObservableInput } from '../../src/Observable'; +import { root } from '../../src/util/root'; +import { $$iterator } from '../../src/symbol/iterator'; import $$symbolObservable from 'symbol-observable'; +import { Observable } from '../../src/Observable'; -export function lowerCaseO(...args): Rx.Observable { +export function lowerCaseO(...args: Array): Rx.Observable { const o = { - subscribe: function (observer) { + subscribe: function (observer: any) { args.forEach(function (v) { observer.next(v); }); @@ -18,7 +19,7 @@ export function lowerCaseO(...args): Rx.Observable { } }; - o[$$symbolObservable] = function () { + o[$$symbolObservable] = function (this: any) { return this; }; @@ -30,17 +31,19 @@ export const createObservableInputs = (value: T) => Rx.Observable.of(value, Rx.Scheduler.async), [value], Promise.resolve(value), - ({ [$$iterator]: () => { - const iteratorResults = [ - {value, done: false}, - {done: true} - ]; - return { - next: () => { - return iteratorResults.shift(); - } - }; - }}), + ({ + [$$iterator]: () => { + const iteratorResults = [ + { value, done: false }, + { done: true } + ]; + return { + next: () => { + return iteratorResults.shift(); + } + }; + } + }), ({ [$$symbolObservable]: () => Rx.Observable.of(value) }) ); diff --git a/spec/helpers/testScheduler-ui.ts b/spec/helpers/testScheduler-ui.ts index 7b425222d7..5d0c2d455c 100644 --- a/spec/helpers/testScheduler-ui.ts +++ b/spec/helpers/testScheduler-ui.ts @@ -1,19 +1,23 @@ /// -/// import * as _ from 'lodash'; -import * as commonInterface from 'mocha/lib/interfaces/common'; -import * as escapeRe from 'escape-string-regexp'; +//import * as commonInterface from 'mocha/lib/interfaces/common'; +//import * as escapeRe from 'escape-string-regexp'; import * as chai from 'chai'; import * as sinonChai from 'sinon-chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import * as marble from './marble-testing'; +//tslint:disable:no-var-requires no-require-imports +const commonInterface = require('mocha/lib/interfaces/common'); +const escapeRe = require('escape-string-regexp'); +//tslint:enable:no-var-requires no-require-imports + //setup sinon-chai chai.use(sinonChai); -declare const module, global, Suite, Test: any; +declare const module: any, global: any, Suite: any, Test: any; if (global && !(typeof window !== 'undefined')) { global.mocha = require('mocha'); // tslint:disable-line:no-require-imports no-var-requires @@ -29,10 +33,10 @@ const diagramFunction = global.asDiagram; //mocha creates own global context per each test suite, simple patching to global won't deliver its context into test cases. //this custom interface is just mimic of existing one amending test scheduler behavior previously test-helper does via global patching. -module.exports = function(suite) { +module.exports = function(suite: any) { const suites = [suite]; - suite.on('pre-require', function(context, file, mocha) { + suite.on('pre-require', function(context: any, file: any, mocha: any) { const common = (commonInterface)(suites, context); context.before = common.before; @@ -57,7 +61,7 @@ module.exports = function(suite) { * and/or tests. */ - context.describe = context.context = function(title, fn) { + context.describe = context.context = function(title: any, fn: any) { const suite = (Suite).create(suites[0], title); suite.file = file; suites.unshift(suite); @@ -70,7 +74,7 @@ module.exports = function(suite) { * Pending describe. */ - context.xdescribe = context.xcontext = context.describe.skip = function(title, fn) { + context.xdescribe = context.xcontext = context.describe.skip = function(title: any, fn: any) { const suite = (Suite).create(suites[0], title); suite.pending = true; suites.unshift(suite); @@ -82,7 +86,7 @@ module.exports = function(suite) { * Exclusive suite. */ - context.describe.only = function(title, fn) { + context.describe.only = function(title: any, fn: any) { const suite = context.describe(title, fn); mocha.grep(suite.fullTitle()); return suite; @@ -94,13 +98,13 @@ module.exports = function(suite) { * exceptional type definition won't be used in test cases. */ - context.type = function (title, fn) { + context.type = function(title: any, fn: any) { //intentionally does not execute to avoid unexpected side effect occurs by subscription, //or infinite source. Suffecient to check build time only. }; - function stringify(x): string { - return JSON.stringify(x, function (key, value) { + function stringify(x: any): string { + return JSON.stringify(x, function (key: string, value: any) { if (Array.isArray(value)) { return '[' + value .map(function (i) { @@ -114,7 +118,7 @@ module.exports = function(suite) { .replace(/\\n/g, '\n'); } - function deleteErrorNotificationStack(marble) { + function deleteErrorNotificationStack(marble: any) { const { notification } = marble; if (notification) { const { kind, error } = notification; @@ -129,7 +133,7 @@ module.exports = function(suite) { * custom assertion formatter for expectObservable test */ - function observableMatcher(actual, expected) { + function observableMatcher(actual: any, expected: any) { if (Array.isArray(actual) && Array.isArray(expected)) { actual = actual.map(deleteErrorNotificationStack); expected = expected.map(deleteErrorNotificationStack); @@ -139,10 +143,10 @@ module.exports = function(suite) { } let message = '\nExpected \n'; - actual.forEach((x) => message += `\t${stringify(x)}\n`); + actual.forEach((x: any) => message += `\t${stringify(x)}\n`); message += '\t\nto deep equal \n'; - expected.forEach((x) => message += `\t${stringify(x)}\n`); + expected.forEach((x: any) => message += `\t${stringify(x)}\n`); chai.assert(passed, message); } else { @@ -156,7 +160,7 @@ module.exports = function(suite) { * acting as a thunk. */ - const it = context.it = context.specify = function(title, fn) { + const it = context.it = context.specify = function(title: any, fn: any) { context.rxTestScheduler = null; let modified = fn; @@ -188,7 +192,7 @@ module.exports = function(suite) { * to be represented as marble diagram png. * It will still serve as normal test cases as well. */ - context.asDiagram = function (label) { + context.asDiagram = function (label: any) { if (diagramFunction) { return diagramFunction(label, it); } @@ -199,7 +203,7 @@ module.exports = function(suite) { * Exclusive test-case. */ - context.it.only = function(title, fn) { + context.it.only = function(title: any, fn: any) { const test = it(title, fn); const reString = '^' + (escapeRe)(test.fullTitle()) + '$'; mocha.grep(new RegExp(reString)); @@ -210,14 +214,14 @@ module.exports = function(suite) { * Pending test case. */ - context.xit = context.xspecify = context.it.skip = function(title) { + context.xit = context.xspecify = context.it.skip = function(title: string) { context.it(title); }; /** * Number of attempts to retry. */ - context.it.retries = function(n) { + context.it.retries = function(n: number) { context.retries(n); }; }); @@ -232,10 +236,10 @@ if (global.Mocha) { //overrides JSON.toStringfy to serialize error object Object.defineProperty(Error.prototype, 'toJSON', { - value: function () { + value: function (this: any) { const alt = {}; - Object.getOwnPropertyNames(this).forEach(function (key) { + Object.getOwnPropertyNames(this).forEach(function (this: any, key: string) { if (key !== 'stack') { alt[key] = this[key]; } diff --git a/spec/observables/IteratorObservable-spec.ts b/spec/observables/IteratorObservable-spec.ts index c1fb5afe05..7907a27b80 100644 --- a/spec/observables/IteratorObservable-spec.ts +++ b/spec/observables/IteratorObservable-spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { queue } from '../../dist/package/scheduler/queue'; -import { IteratorObservable } from '../../dist/package/observable/IteratorObservable'; +import * as Rx from '../../src/Rx'; +import { queue } from '../../src/scheduler/queue'; +import { IteratorObservable } from '../../src/observable/IteratorObservable'; declare const expectObservable; declare const rxTestScheduler: Rx.TestScheduler; diff --git a/spec/observables/ScalarObservable-spec.ts b/spec/observables/ScalarObservable-spec.ts index 4ac406b5bf..325ab39e23 100644 --- a/spec/observables/ScalarObservable-spec.ts +++ b/spec/observables/ScalarObservable-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { ScalarObservable } from '../../dist/package/observable/ScalarObservable'; +import * as Rx from '../../src/Rx'; +import { ScalarObservable } from '../../src/observable/ScalarObservable'; declare const rxTestScheduler: Rx.TestScheduler; diff --git a/spec/observables/SubscribeOnObservable-spec.ts b/spec/observables/SubscribeOnObservable-spec.ts index 4851c9b470..3e9d88176a 100644 --- a/spec/observables/SubscribeOnObservable-spec.ts +++ b/spec/observables/SubscribeOnObservable-spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; -import { SubscribeOnObservable } from '../../dist/package/observable/SubscribeOnObservable'; +import * as Rx from '../../src/Rx'; +import { SubscribeOnObservable } from '../../src/observable/SubscribeOnObservable'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/observables/bindCallback-spec.ts b/spec/observables/bindCallback-spec.ts index 8591520fd4..02f3bbd28e 100644 --- a/spec/observables/bindCallback-spec.ts +++ b/spec/observables/bindCallback-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/bindNodeCallback-spec.ts b/spec/observables/bindNodeCallback-spec.ts index 7992d888b2..16fa09e64d 100644 --- a/spec/observables/bindNodeCallback-spec.ts +++ b/spec/observables/bindNodeCallback-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/combineLatest-spec.ts b/spec/observables/combineLatest-spec.ts index 8a2bb2c3dc..c7a2b0df71 100644 --- a/spec/observables/combineLatest-spec.ts +++ b/spec/observables/combineLatest-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { type }; diff --git a/spec/observables/concat-spec.ts b/spec/observables/concat-spec.ts index aff156edf1..0da4bb15b7 100644 --- a/spec/observables/concat-spec.ts +++ b/spec/observables/concat-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/observables/defer-spec.ts b/spec/observables/defer-spec.ts index 092178c95e..1713771162 100644 --- a/spec/observables/defer-spec.ts +++ b/spec/observables/defer-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/dom/ajax-spec.ts b/spec/observables/dom/ajax-spec.ts index 44eebfbc23..19c3e271d7 100644 --- a/spec/observables/dom/ajax-spec.ts +++ b/spec/observables/dom/ajax-spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../../dist/package/Rx'; -import { root } from '../../../dist/package/util/root'; +import * as Rx from '../../../src/Rx'; +import { root } from '../../../src/util/root'; declare const global: any; diff --git a/spec/observables/dom/webSocket-spec.ts b/spec/observables/dom/webSocket-spec.ts index e9c109f1b6..b817267aa8 100644 --- a/spec/observables/dom/webSocket-spec.ts +++ b/spec/observables/dom/webSocket-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../../dist/package/Rx'; +import * as Rx from '../../../src/Rx'; declare const __root__: any; diff --git a/spec/observables/empty-spec.ts b/spec/observables/empty-spec.ts index df11f0f386..311b5a675f 100644 --- a/spec/observables/empty-spec.ts +++ b/spec/observables/empty-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/forkJoin-spec.ts b/spec/observables/forkJoin-spec.ts index 6cff0e3ea6..685b5c5aab 100644 --- a/spec/observables/forkJoin-spec.ts +++ b/spec/observables/forkJoin-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/observables/from-promise-spec.ts b/spec/observables/from-promise-spec.ts index 2e78747272..1bb3f1369b 100644 --- a/spec/observables/from-promise-spec.ts +++ b/spec/observables/from-promise-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; declare const process: any; const Observable = Rx.Observable; diff --git a/spec/observables/from-spec.ts b/spec/observables/from-spec.ts index b665c28a82..d527ee3ba6 100644 --- a/spec/observables/from-spec.ts +++ b/spec/observables/from-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; declare const {asDiagram, expectObservable, Symbol, type}; declare const rxTestScheduler: Rx.TestScheduler; diff --git a/spec/observables/fromEvent-spec.ts b/spec/observables/fromEvent-spec.ts index 59655eeffd..d6c0cfe0cb 100644 --- a/spec/observables/fromEvent-spec.ts +++ b/spec/observables/fromEvent-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/fromEventPattern-spec.ts b/spec/observables/fromEventPattern-spec.ts index 015c79c16b..2f71e0beea 100644 --- a/spec/observables/fromEventPattern-spec.ts +++ b/spec/observables/fromEventPattern-spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; -import { noop } from '../../dist/package/util/noop'; +import * as Rx from '../../src/Rx'; +import { noop } from '../../src/util/noop'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/generate-spec.ts b/spec/observables/generate-spec.ts index 0436bd4d0c..f7c6fa1a0c 100644 --- a/spec/observables/generate-spec.ts +++ b/spec/observables/generate-spec.ts @@ -1,6 +1,6 @@ -import * as Rx from '../../dist/package/Rx'; -import '../../dist/package/add/observable/generate'; -import { TestScheduler } from '../../dist/package/testing/TestScheduler'; +import * as Rx from '../../src/Rx'; +import '../../src/add/observable/generate'; +import { TestScheduler } from '../../src/testing/TestScheduler'; import { expect } from 'chai'; declare const {asDiagram, expectObservable}; declare const rxTestScheduler: TestScheduler; diff --git a/spec/observables/if-spec.ts b/spec/observables/if-spec.ts index 0dc7906df5..22ca35e49a 100644 --- a/spec/observables/if-spec.ts +++ b/spec/observables/if-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const expectObservable: typeof marbleTestingSignature.expectObservable; diff --git a/spec/observables/interval-spec.ts b/spec/observables/interval-spec.ts index dd7538086f..2faded0ddb 100644 --- a/spec/observables/interval-spec.ts +++ b/spec/observables/interval-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/merge-spec.ts b/spec/observables/merge-spec.ts index 2fb95c4973..2147d2849e 100644 --- a/spec/observables/merge-spec.ts +++ b/spec/observables/merge-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/observables/never-spec.ts b/spec/observables/never-spec.ts index 093181d97c..124de22f9e 100644 --- a/spec/observables/never-spec.ts +++ b/spec/observables/never-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/of-spec.ts b/spec/observables/of-spec.ts index 6a35fe3150..e5b49d0cd5 100644 --- a/spec/observables/of-spec.ts +++ b/spec/observables/of-spec.ts @@ -1,8 +1,8 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { ArrayObservable } from '../../dist/package/observable/ArrayObservable'; -import { ScalarObservable } from '../../dist/package/observable/ScalarObservable'; -import { EmptyObservable } from '../../dist/package/observable/EmptyObservable'; +import * as Rx from '../../src/Rx'; +import { ArrayObservable } from '../../src/observable/ArrayObservable'; +import { ScalarObservable } from '../../src/observable/ScalarObservable'; +import { EmptyObservable } from '../../src/observable/EmptyObservable'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/onErrorResumeNext-spec.ts b/spec/observables/onErrorResumeNext-spec.ts index b7ee3a8757..7854dcafa3 100644 --- a/spec/observables/onErrorResumeNext-spec.ts +++ b/spec/observables/onErrorResumeNext-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/observables/pairs-spec.ts b/spec/observables/pairs-spec.ts index 61b7937716..ef8aa05f51 100644 --- a/spec/observables/pairs-spec.ts +++ b/spec/observables/pairs-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/race-spec.ts b/spec/observables/race-spec.ts index 30865b5ada..b2eaa1f7c2 100644 --- a/spec/observables/race-spec.ts +++ b/spec/observables/race-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/observables/range-spec.ts b/spec/observables/range-spec.ts index c6cbf30983..e9d13e929c 100644 --- a/spec/observables/range-spec.ts +++ b/spec/observables/range-spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; -import { RangeObservable } from '../../dist/package/observable/RangeObservable'; +import * as Rx from '../../src/Rx'; +import { RangeObservable } from '../../src/observable/RangeObservable'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/throw-spec.ts b/spec/observables/throw-spec.ts index 94adadff2b..577bef871e 100644 --- a/spec/observables/throw-spec.ts +++ b/spec/observables/throw-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { ErrorObservable } from '../../dist/package/observable/ErrorObservable'; +import * as Rx from '../../src/Rx'; +import { ErrorObservable } from '../../src/observable/ErrorObservable'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/observables/timer-spec.ts b/spec/observables/timer-spec.ts index 3e813c6bfd..e09b809ad5 100644 --- a/spec/observables/timer-spec.ts +++ b/spec/observables/timer-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/observables/using-spec.ts b/spec/observables/using-spec.ts index 2bdd822a17..8b5a7a80b0 100644 --- a/spec/observables/using-spec.ts +++ b/spec/observables/using-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; const Observable = Rx.Observable; const Subscription = Rx.Subscription; diff --git a/spec/observables/zip-spec.ts b/spec/observables/zip-spec.ts index 8753abe4a9..3be791b039 100644 --- a/spec/observables/zip-spec.ts +++ b/spec/observables/zip-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { type }; diff --git a/spec/operators/audit-spec.ts b/spec/operators/audit-spec.ts index 8e1dca4baf..ebecd4cf86 100644 --- a/spec/operators/audit-spec.ts +++ b/spec/operators/audit-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/auditTime-spec.ts b/spec/operators/auditTime-spec.ts index 81997c7a55..e9d53c0530 100644 --- a/spec/operators/auditTime-spec.ts +++ b/spec/operators/auditTime-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/buffer-spec.ts b/spec/operators/buffer-spec.ts index 6b1bc22a48..c70a13fb11 100644 --- a/spec/operators/buffer-spec.ts +++ b/spec/operators/buffer-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/bufferCount-spec.ts b/spec/operators/bufferCount-spec.ts index 579fc0f9be..d1a0bb4f92 100644 --- a/spec/operators/bufferCount-spec.ts +++ b/spec/operators/bufferCount-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { expect } from 'chai'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/operators/bufferTime-spec.ts b/spec/operators/bufferTime-spec.ts index bb86409c87..b3f729e248 100644 --- a/spec/operators/bufferTime-spec.ts +++ b/spec/operators/bufferTime-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/bufferToggle-spec.ts b/spec/operators/bufferToggle-spec.ts index 02da0ec509..2f54785a21 100644 --- a/spec/operators/bufferToggle-spec.ts +++ b/spec/operators/bufferToggle-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/bufferWhen-spec.ts b/spec/operators/bufferWhen-spec.ts index 1abc095d06..d42b7f0a0c 100644 --- a/spec/operators/bufferWhen-spec.ts +++ b/spec/operators/bufferWhen-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/catch-spec.ts b/spec/operators/catch-spec.ts index fe707c834c..22996203b8 100644 --- a/spec/operators/catch-spec.ts +++ b/spec/operators/catch-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import * as sinon from 'sinon'; import { createObservableInputs } from '../helpers/test-helper'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/operators/combineAll-spec.ts b/spec/operators/combineAll-spec.ts index a00f6ce64f..e30227e6f9 100644 --- a/spec/operators/combineAll-spec.ts +++ b/spec/operators/combineAll-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/combineLatest-spec.ts b/spec/operators/combineLatest-spec.ts index 7510fee2f0..b4c942c870 100644 --- a/spec/operators/combineLatest-spec.ts +++ b/spec/operators/combineLatest-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/concat-spec.ts b/spec/operators/concat-spec.ts index 3fc571e69d..c6d6681b29 100644 --- a/spec/operators/concat-spec.ts +++ b/spec/operators/concat-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/concatAll-spec.ts b/spec/operators/concatAll-spec.ts index cb3430198e..616c395e42 100644 --- a/spec/operators/concatAll-spec.ts +++ b/spec/operators/concatAll-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/concatMap-spec.ts b/spec/operators/concatMap-spec.ts index e74d6d1eaa..f0216973fd 100644 --- a/spec/operators/concatMap-spec.ts +++ b/spec/operators/concatMap-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/concatMapTo-spec.ts b/spec/operators/concatMapTo-spec.ts index e30f396b06..00fed8d222 100644 --- a/spec/operators/concatMapTo-spec.ts +++ b/spec/operators/concatMapTo-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/count-spec.ts b/spec/operators/count-spec.ts index 43b0c82a4c..afa813659e 100644 --- a/spec/operators/count-spec.ts +++ b/spec/operators/count-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/debounce-spec.ts b/spec/operators/debounce-spec.ts index 45d4fef21b..20e6079089 100644 --- a/spec/operators/debounce-spec.ts +++ b/spec/operators/debounce-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/debounceTime-spec.ts b/spec/operators/debounceTime-spec.ts index 02ed83d5d1..693469d803 100644 --- a/spec/operators/debounceTime-spec.ts +++ b/spec/operators/debounceTime-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/defaultIfEmpty-spec.ts b/spec/operators/defaultIfEmpty-spec.ts index 39a623ee06..d591d64b3a 100644 --- a/spec/operators/defaultIfEmpty-spec.ts +++ b/spec/operators/defaultIfEmpty-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/delay-spec.ts b/spec/operators/delay-spec.ts index 499a24d846..40c4008da4 100644 --- a/spec/operators/delay-spec.ts +++ b/spec/operators/delay-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/delayWhen-spec.ts b/spec/operators/delayWhen-spec.ts index 0e5388bf34..e666b7f95a 100644 --- a/spec/operators/delayWhen-spec.ts +++ b/spec/operators/delayWhen-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports import { expect } from 'chai'; diff --git a/spec/operators/dematerialize-spec.ts b/spec/operators/dematerialize-spec.ts index 88974ef063..4feef72ecd 100644 --- a/spec/operators/dematerialize-spec.ts +++ b/spec/operators/dematerialize-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/distinct-spec.ts b/spec/operators/distinct-spec.ts index a8996944a0..8cae1d7415 100644 --- a/spec/operators/distinct-spec.ts +++ b/spec/operators/distinct-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/operators/distinctUntilChanged-spec.ts b/spec/operators/distinctUntilChanged-spec.ts index 2337f5cf87..50875f6003 100644 --- a/spec/operators/distinctUntilChanged-spec.ts +++ b/spec/operators/distinctUntilChanged-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/distinctUntilKeyChanged-spec.ts b/spec/operators/distinctUntilKeyChanged-spec.ts index 1adb93a2ce..4d537298a8 100644 --- a/spec/operators/distinctUntilKeyChanged-spec.ts +++ b/spec/operators/distinctUntilKeyChanged-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/do-spec.ts b/spec/operators/do-spec.ts index 552c381535..2c22d7f488 100644 --- a/spec/operators/do-spec.ts +++ b/spec/operators/do-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/elementAt-spec.ts b/spec/operators/elementAt-spec.ts index e93968eadd..f302ea0bd1 100644 --- a/spec/operators/elementAt-spec.ts +++ b/spec/operators/elementAt-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/every-spec.ts b/spec/operators/every-spec.ts index 65674db90e..f80a113715 100644 --- a/spec/operators/every-spec.ts +++ b/spec/operators/every-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/exhaust-spec.ts b/spec/operators/exhaust-spec.ts index 68d918137d..cc36ffc204 100644 --- a/spec/operators/exhaust-spec.ts +++ b/spec/operators/exhaust-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/exhaustMap-spec.ts b/spec/operators/exhaustMap-spec.ts index 696b4854df..2fca97bd83 100644 --- a/spec/operators/exhaustMap-spec.ts +++ b/spec/operators/exhaustMap-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/expand-spec.ts b/spec/operators/expand-spec.ts index ec9628c5e4..49e3af0455 100644 --- a/spec/operators/expand-spec.ts +++ b/spec/operators/expand-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/filter-spec.ts b/spec/operators/filter-spec.ts index 6eb3be68d9..4bd95b0f2e 100644 --- a/spec/operators/filter-spec.ts +++ b/spec/operators/filter-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/finally-spec.ts b/spec/operators/finally-spec.ts index 9614e6e58a..33b3ffc206 100644 --- a/spec/operators/finally-spec.ts +++ b/spec/operators/finally-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, Symbol, type }; diff --git a/spec/operators/find-spec.ts b/spec/operators/find-spec.ts index cb503e8e02..6ebdcb696c 100644 --- a/spec/operators/find-spec.ts +++ b/spec/operators/find-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/findIndex-spec.ts b/spec/operators/findIndex-spec.ts index 656314f312..dba420e589 100644 --- a/spec/operators/findIndex-spec.ts +++ b/spec/operators/findIndex-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/first-spec.ts b/spec/operators/first-spec.ts index b5c46768a9..8e4fdedb65 100644 --- a/spec/operators/first-spec.ts +++ b/spec/operators/first-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/groupBy-spec.ts b/spec/operators/groupBy-spec.ts index 5adf98abd5..5ff73a913e 100644 --- a/spec/operators/groupBy-spec.ts +++ b/spec/operators/groupBy-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { GroupedObservable } from '../../dist/package/operators/groupBy'; +import * as Rx from '../../src/Rx'; +import { GroupedObservable } from '../../src/operators/groupBy'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/ignoreElements-spec.ts b/spec/operators/ignoreElements-spec.ts index 71a9e052cc..8ab327cb7d 100644 --- a/spec/operators/ignoreElements-spec.ts +++ b/spec/operators/ignoreElements-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/isEmpty-spec.ts b/spec/operators/isEmpty-spec.ts index 5a38d5fecc..262896383b 100644 --- a/spec/operators/isEmpty-spec.ts +++ b/spec/operators/isEmpty-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/last-spec.ts b/spec/operators/last-spec.ts index b170997ec6..131b0149b0 100644 --- a/spec/operators/last-spec.ts +++ b/spec/operators/last-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/let-spec.ts b/spec/operators/let-spec.ts index 2142176a31..672dfc782b 100644 --- a/spec/operators/let-spec.ts +++ b/spec/operators/let-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; /** @test {let} */ describe('Observable.prototype.let', () => { diff --git a/spec/operators/map-spec.ts b/spec/operators/map-spec.ts index 100cc1a386..5b23d44735 100644 --- a/spec/operators/map-spec.ts +++ b/spec/operators/map-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/mapTo-spec.ts b/spec/operators/mapTo-spec.ts index bc61af8aab..b270d3b1db 100644 --- a/spec/operators/mapTo-spec.ts +++ b/spec/operators/mapTo-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/materialize-spec.ts b/spec/operators/materialize-spec.ts index 2dd0211f5f..fb2c95ab6a 100644 --- a/spec/operators/materialize-spec.ts +++ b/spec/operators/materialize-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/max-spec.ts b/spec/operators/max-spec.ts index c1753f609d..b8f995aab8 100644 --- a/spec/operators/max-spec.ts +++ b/spec/operators/max-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/merge-spec.ts b/spec/operators/merge-spec.ts index aa8d5e3200..fdcc56e823 100644 --- a/spec/operators/merge-spec.ts +++ b/spec/operators/merge-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/mergeAll-spec.ts b/spec/operators/mergeAll-spec.ts index 60c0507b8f..32654a18b0 100644 --- a/spec/operators/mergeAll-spec.ts +++ b/spec/operators/mergeAll-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/mergeMap-spec.ts b/spec/operators/mergeMap-spec.ts index 8bd3254a5d..4db8cab7ad 100644 --- a/spec/operators/mergeMap-spec.ts +++ b/spec/operators/mergeMap-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, type }; diff --git a/spec/operators/mergeMapTo-spec.ts b/spec/operators/mergeMapTo-spec.ts index d3695b775a..fef41e0a97 100644 --- a/spec/operators/mergeMapTo-spec.ts +++ b/spec/operators/mergeMapTo-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, type }; diff --git a/spec/operators/mergeScan-spec.ts b/spec/operators/mergeScan-spec.ts index 9c1cbf336d..90194db1ff 100644 --- a/spec/operators/mergeScan-spec.ts +++ b/spec/operators/mergeScan-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/operators/min-spec.ts b/spec/operators/min-spec.ts index 45b8d721d6..29555ebbe3 100644 --- a/spec/operators/min-spec.ts +++ b/spec/operators/min-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/multicast-spec.ts b/spec/operators/multicast-spec.ts index cdcfd2d739..164925138c 100644 --- a/spec/operators/multicast-spec.ts +++ b/spec/operators/multicast-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time, rxTestScheduler }; diff --git a/spec/operators/observeOn-spec.ts b/spec/operators/observeOn-spec.ts index 862b4c5d14..dcc181b917 100644 --- a/spec/operators/observeOn-spec.ts +++ b/spec/operators/observeOn-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { expect } from 'chai'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/operators/onErrorResumeNext-spec.ts b/spec/operators/onErrorResumeNext-spec.ts index 77d9fa9b5c..86ced33081 100644 --- a/spec/operators/onErrorResumeNext-spec.ts +++ b/spec/operators/onErrorResumeNext-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/partition-spec.ts b/spec/operators/partition-spec.ts index 6d1c0877a4..000e4c36fa 100644 --- a/spec/operators/partition-spec.ts +++ b/spec/operators/partition-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/pluck-spec.ts b/spec/operators/pluck-spec.ts index 2b554c1376..391958192b 100644 --- a/spec/operators/pluck-spec.ts +++ b/spec/operators/pluck-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/publish-spec.ts b/spec/operators/publish-spec.ts index 075d769651..97eb079359 100644 --- a/spec/operators/publish-spec.ts +++ b/spec/operators/publish-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/publishBehavior-spec.ts b/spec/operators/publishBehavior-spec.ts index 4f6337e8d5..c69234aee9 100644 --- a/spec/operators/publishBehavior-spec.ts +++ b/spec/operators/publishBehavior-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/publishLast-spec.ts b/spec/operators/publishLast-spec.ts index 8c03d3b2f9..3b37ee5c84 100644 --- a/spec/operators/publishLast-spec.ts +++ b/spec/operators/publishLast-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/publishReplay-spec.ts b/spec/operators/publishReplay-spec.ts index 5b6c9ace8a..a15c9bb88a 100644 --- a/spec/operators/publishReplay-spec.ts +++ b/spec/operators/publishReplay-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/race-spec.ts b/spec/operators/race-spec.ts index 1c51ce1d53..24256c0e85 100644 --- a/spec/operators/race-spec.ts +++ b/spec/operators/race-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/operators/reduce-spec.ts b/spec/operators/reduce-spec.ts index 85a6ecf77f..f88f010444 100644 --- a/spec/operators/reduce-spec.ts +++ b/spec/operators/reduce-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, type }; diff --git a/spec/operators/refCount-spec.ts b/spec/operators/refCount-spec.ts index b3996fcf85..4f88056c19 100644 --- a/spec/operators/refCount-spec.ts +++ b/spec/operators/refCount-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/repeat-spec.ts b/spec/operators/repeat-spec.ts index 3f177fc616..a4dcd95d7d 100644 --- a/spec/operators/repeat-spec.ts +++ b/spec/operators/repeat-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/repeatWhen-spec.ts b/spec/operators/repeatWhen-spec.ts index fb233d8fbd..6d1cfa321e 100644 --- a/spec/operators/repeatWhen-spec.ts +++ b/spec/operators/repeatWhen-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/retry-spec.ts b/spec/operators/retry-spec.ts index bce76d3ae1..e151cdf6bd 100644 --- a/spec/operators/retry-spec.ts +++ b/spec/operators/retry-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/retryWhen-spec.ts b/spec/operators/retryWhen-spec.ts index 8ee4a658ad..0e8767861a 100644 --- a/spec/operators/retryWhen-spec.ts +++ b/spec/operators/retryWhen-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/sample-spec.ts b/spec/operators/sample-spec.ts index 32b225bfdf..b2666ccd46 100644 --- a/spec/operators/sample-spec.ts +++ b/spec/operators/sample-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { expect } from 'chai'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/operators/sampleTime-spec.ts b/spec/operators/sampleTime-spec.ts index 627214cd90..c05be93d07 100644 --- a/spec/operators/sampleTime-spec.ts +++ b/spec/operators/sampleTime-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/scan-spec.ts b/spec/operators/scan-spec.ts index 6f98f0d21e..c55f6a45a9 100644 --- a/spec/operators/scan-spec.ts +++ b/spec/operators/scan-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, type }; diff --git a/spec/operators/share-spec.ts b/spec/operators/share-spec.ts index a66a7c573e..499977a5bf 100644 --- a/spec/operators/share-spec.ts +++ b/spec/operators/share-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/shareReplay-spec.ts b/spec/operators/shareReplay-spec.ts index 740f5f5840..91d6d0d184 100644 --- a/spec/operators/shareReplay-spec.ts +++ b/spec/operators/shareReplay-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/single-spec.ts b/spec/operators/single-spec.ts index aa999fb37a..3ff97b715d 100644 --- a/spec/operators/single-spec.ts +++ b/spec/operators/single-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/skip-spec.ts b/spec/operators/skip-spec.ts index 48043e88ae..1b0a3f02c1 100644 --- a/spec/operators/skip-spec.ts +++ b/spec/operators/skip-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/skipLast-spec.ts b/spec/operators/skipLast-spec.ts index 6a740a0827..ffdb61afd9 100644 --- a/spec/operators/skipLast-spec.ts +++ b/spec/operators/skipLast-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/skipUntil-spec.ts b/spec/operators/skipUntil-spec.ts index 2f2ba0d8e2..6b849cdeae 100644 --- a/spec/operators/skipUntil-spec.ts +++ b/spec/operators/skipUntil-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/skipWhile-spec.ts b/spec/operators/skipWhile-spec.ts index 888c5ab0d1..68330ed827 100644 --- a/spec/operators/skipWhile-spec.ts +++ b/spec/operators/skipWhile-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/startWith-spec.ts b/spec/operators/startWith-spec.ts index 7428fe82df..57d0522460 100644 --- a/spec/operators/startWith-spec.ts +++ b/spec/operators/startWith-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/subscribeOn-spec.ts b/spec/operators/subscribeOn-spec.ts index dfee14f8ad..3924fc12eb 100644 --- a/spec/operators/subscribeOn-spec.ts +++ b/spec/operators/subscribeOn-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/switch-spec.ts b/spec/operators/switch-spec.ts index 4baac194db..bcafd1d257 100644 --- a/spec/operators/switch-spec.ts +++ b/spec/operators/switch-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/switchMap-spec.ts b/spec/operators/switchMap-spec.ts index 0313e81575..ef9b47042d 100644 --- a/spec/operators/switchMap-spec.ts +++ b/spec/operators/switchMap-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/switchMapTo-spec.ts b/spec/operators/switchMapTo-spec.ts index ac9c9bfeee..1e3135002d 100644 --- a/spec/operators/switchMapTo-spec.ts +++ b/spec/operators/switchMapTo-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/take-spec.ts b/spec/operators/take-spec.ts index f193443173..1f05045720 100644 --- a/spec/operators/take-spec.ts +++ b/spec/operators/take-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/takeLast-spec.ts b/spec/operators/takeLast-spec.ts index f7f113151e..03cb72ab0a 100644 --- a/spec/operators/takeLast-spec.ts +++ b/spec/operators/takeLast-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/takeUntil-spec.ts b/spec/operators/takeUntil-spec.ts index 00ad8d7649..0e438ef2b0 100644 --- a/spec/operators/takeUntil-spec.ts +++ b/spec/operators/takeUntil-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/takeWhile-spec.ts b/spec/operators/takeWhile-spec.ts index 671a2190ab..47733ea284 100644 --- a/spec/operators/takeWhile-spec.ts +++ b/spec/operators/takeWhile-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/throttle-spec.ts b/spec/operators/throttle-spec.ts index 06e1d9bc13..7bdce50eec 100644 --- a/spec/operators/throttle-spec.ts +++ b/spec/operators/throttle-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/throttleTime-spec.ts b/spec/operators/throttleTime-spec.ts index e668c9b9c7..6b8d93cb7f 100644 --- a/spec/operators/throttleTime-spec.ts +++ b/spec/operators/throttleTime-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/timeInterval-spec.ts b/spec/operators/timeInterval-spec.ts index 4bc663d613..2c36658239 100644 --- a/spec/operators/timeInterval-spec.ts +++ b/spec/operators/timeInterval-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/timeout-spec.ts b/spec/operators/timeout-spec.ts index 6b1c2469a8..60e1c66107 100644 --- a/spec/operators/timeout-spec.ts +++ b/spec/operators/timeout-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/timeoutWith-spec.ts b/spec/operators/timeoutWith-spec.ts index 89518fa6bf..ee203b6e4a 100644 --- a/spec/operators/timeoutWith-spec.ts +++ b/spec/operators/timeoutWith-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/timestamp-spec.ts b/spec/operators/timestamp-spec.ts index f94a46f9dd..b324546dae 100644 --- a/spec/operators/timestamp-spec.ts +++ b/spec/operators/timestamp-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/operators/toArray-spec.ts b/spec/operators/toArray-spec.ts index 1338970a36..259a50b263 100644 --- a/spec/operators/toArray-spec.ts +++ b/spec/operators/toArray-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, type }; diff --git a/spec/operators/toPromise-spec.ts b/spec/operators/toPromise-spec.ts index 3a38ffac25..3cabdf8a9e 100644 --- a/spec/operators/toPromise-spec.ts +++ b/spec/operators/toPromise-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; declare const __root__: any; const Observable = Rx.Observable; diff --git a/spec/operators/window-spec.ts b/spec/operators/window-spec.ts index a131f6490f..312c96c854 100644 --- a/spec/operators/window-spec.ts +++ b/spec/operators/window-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/windowCount-spec.ts b/spec/operators/windowCount-spec.ts index 1801f27d32..8691759b82 100644 --- a/spec/operators/windowCount-spec.ts +++ b/spec/operators/windowCount-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/windowTime-spec.ts b/spec/operators/windowTime-spec.ts index 6f2e6362f2..d632a65de0 100644 --- a/spec/operators/windowTime-spec.ts +++ b/spec/operators/windowTime-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/windowToggle-spec.ts b/spec/operators/windowToggle-spec.ts index 8b04577cf3..7184a0e2b4 100644 --- a/spec/operators/windowToggle-spec.ts +++ b/spec/operators/windowToggle-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/windowWhen-spec.ts b/spec/operators/windowWhen-spec.ts index 0fdd7882d1..5e6f0832d9 100644 --- a/spec/operators/windowWhen-spec.ts +++ b/spec/operators/windowWhen-spec.ts @@ -1,4 +1,4 @@ -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram, time }; diff --git a/spec/operators/withLatestFrom-spec.ts b/spec/operators/withLatestFrom-spec.ts index 3cdd5106fc..7e98d5cc44 100644 --- a/spec/operators/withLatestFrom-spec.ts +++ b/spec/operators/withLatestFrom-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports diff --git a/spec/operators/zip-spec.ts b/spec/operators/zip-spec.ts index ab3852a0b8..c6d779afa5 100644 --- a/spec/operators/zip-spec.ts +++ b/spec/operators/zip-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const type; diff --git a/spec/operators/zipAll-spec.ts b/spec/operators/zipAll-spec.ts index 011ee2131d..468ae62885 100644 --- a/spec/operators/zipAll-spec.ts +++ b/spec/operators/zipAll-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/spec/root-module-spec.ts b/spec/root-module-spec.ts index e344725781..ef9926e6b1 100644 --- a/spec/root-module-spec.ts +++ b/spec/root-module-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../dist/package/Rx'; +import * as Rx from '../src/Rx'; describe('Root Module', () => { it('should contain exports from commonjs modules', () => { diff --git a/spec/schedulers/AnimationFrameScheduler-spec.ts b/spec/schedulers/AnimationFrameScheduler-spec.ts index f29fff5034..5a630c6ce0 100644 --- a/spec/schedulers/AnimationFrameScheduler-spec.ts +++ b/spec/schedulers/AnimationFrameScheduler-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; const animationFrame = Rx.Scheduler.animationFrame; diff --git a/spec/schedulers/AsapScheduler-spec.ts b/spec/schedulers/AsapScheduler-spec.ts index 1428dfb2be..91a5c1be3e 100644 --- a/spec/schedulers/AsapScheduler-spec.ts +++ b/spec/schedulers/AsapScheduler-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; const asap = Rx.Scheduler.asap; diff --git a/spec/schedulers/QueueScheduler-spec.ts b/spec/schedulers/QueueScheduler-spec.ts index 6543f65e80..154346ba1c 100644 --- a/spec/schedulers/QueueScheduler-spec.ts +++ b/spec/schedulers/QueueScheduler-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; const Scheduler = Rx.Scheduler; const queue = Scheduler.queue; diff --git a/spec/schedulers/TestScheduler-spec.ts b/spec/schedulers/TestScheduler-spec.ts index 550d33cab1..9ee546324f 100644 --- a/spec/schedulers/TestScheduler-spec.ts +++ b/spec/schedulers/TestScheduler-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { time }; diff --git a/spec/schedulers/VirtualTimeScheduler-spec.ts b/spec/schedulers/VirtualTimeScheduler-spec.ts index 0f99daa7b0..45deffa426 100644 --- a/spec/schedulers/VirtualTimeScheduler-spec.ts +++ b/spec/schedulers/VirtualTimeScheduler-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { VirtualAction } from '../../dist/package/scheduler/VirtualTimeScheduler'; +import * as Rx from '../../src/Rx'; +import { VirtualAction } from '../../src/scheduler/VirtualTimeScheduler'; const VirtualTimeScheduler = Rx.VirtualTimeScheduler; diff --git a/spec/subjects/AsyncSubject-spec.ts b/spec/subjects/AsyncSubject-spec.ts index 9f06623af9..01dfea091f 100644 --- a/spec/subjects/AsyncSubject-spec.ts +++ b/spec/subjects/AsyncSubject-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; const AsyncSubject = Rx.AsyncSubject; diff --git a/spec/subjects/BehaviorSubject-spec.ts b/spec/subjects/BehaviorSubject-spec.ts index 6b0d8bc5f5..638569d17b 100644 --- a/spec/subjects/BehaviorSubject-spec.ts +++ b/spec/subjects/BehaviorSubject-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { time }; diff --git a/spec/subjects/ReplaySubject-spec.ts b/spec/subjects/ReplaySubject-spec.ts index 933943ff60..9e774800e0 100644 --- a/spec/subjects/ReplaySubject-spec.ts +++ b/spec/subjects/ReplaySubject-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { TestScheduler } from '../../dist/package/testing/TestScheduler'; +import * as Rx from '../../src/Rx'; +import { TestScheduler } from '../../src/testing/TestScheduler'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const hot: typeof marbleTestingSignature.hot; diff --git a/spec/support/debug.opts b/spec/support/debug.opts deleted file mode 100644 index 2287c7690a..0000000000 --- a/spec/support/debug.opts +++ /dev/null @@ -1,12 +0,0 @@ ---require source-map-support/register ---require spec-js/helpers/testScheduler-ui.js ---ui spec-js/helpers/testScheduler-ui.js - ---reporter dot ---bail ---full-trace ---check-leaks ---globals WebSocket,FormData,XDomainRequest,ActiveXObject - ---recursive ---timeout 100000 diff --git a/spec/support/default.opts b/spec/support/default.opts index f24cb86f54..419ffe734d 100644 --- a/spec/support/default.opts +++ b/spec/support/default.opts @@ -1,6 +1,6 @@ --require source-map-support/register ---require spec-js/helpers/testScheduler-ui.js ---ui spec-js/helpers/testScheduler-ui.js +--require .out/spec/helpers/testScheduler-ui.js +--ui .out/spec/helpers/testScheduler-ui.js --reporter dot diff --git a/spec/symbol/iterator-spec.ts b/spec/symbol/iterator-spec.ts index 9fa1e4ea5e..d1f0bbfaa9 100644 --- a/spec/symbol/iterator-spec.ts +++ b/spec/symbol/iterator-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { $$iterator, symbolIteratorPonyfill } from '../../dist/package/symbol/iterator'; +import { $$iterator, symbolIteratorPonyfill } from '../../src/symbol/iterator'; describe('iterator symbol', () => { it('should exist', () => { diff --git a/spec/symbol/observable-polyfilled-spec.ts b/spec/symbol/observable-polyfilled-spec.ts index fa7989c812..c6dfa7bbf9 100644 --- a/spec/symbol/observable-polyfilled-spec.ts +++ b/spec/symbol/observable-polyfilled-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import { getSymbolObservable } from '../../dist/package/symbol/observable'; +import { getSymbolObservable } from '../../src/symbol/observable'; describe('observable symbol', () => { it('should exist in the proper form when Symbol does not exist', () => { diff --git a/spec/symbol/observable-spec.ts b/spec/symbol/observable-spec.ts index f86ca58af4..6c2d502b77 100644 --- a/spec/symbol/observable-spec.ts +++ b/spec/symbol/observable-spec.ts @@ -1,8 +1,8 @@ import { expect } from 'chai'; import $$symbolObservable from 'symbol-observable'; -import { root } from '../../dist/package/util/root'; -import { getSymbolObservable } from '../../dist/package/symbol/observable'; +import { root } from '../../src/util/root'; +import { getSymbolObservable } from '../../src/symbol/observable'; describe('observable symbol', () => { it('should exist in the proper form', () => { diff --git a/spec/symbol/rxSubscriber-spec.ts b/spec/symbol/rxSubscriber-spec.ts index 573a78d99a..b5e793be0d 100644 --- a/spec/symbol/rxSubscriber-spec.ts +++ b/spec/symbol/rxSubscriber-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; -import { root } from '../../dist/package/util/root'; -import {$$rxSubscriber} from '../../dist/package/symbol/rxSubscriber'; +import { root } from '../../src/util/root'; +import {$$rxSubscriber} from '../../src/symbol/rxSubscriber'; describe('rxSubscriber symbol', () => { it('should exist in the proper form', () => { diff --git a/spec/util/FastMap-spec.ts b/spec/util/FastMap-spec.ts index 7cf68a51ee..a9b8c520c6 100644 --- a/spec/util/FastMap-spec.ts +++ b/spec/util/FastMap-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { FastMap } from '../../dist/package/util/FastMap'; +import { FastMap } from '../../src/util/FastMap'; /** @test {FastMap} */ describe('FastMap', () => { diff --git a/spec/util/Immediate-spec.ts b/spec/util/Immediate-spec.ts index 7528a7d474..8c8eaea432 100644 --- a/spec/util/Immediate-spec.ts +++ b/spec/util/Immediate-spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import { ImmediateDefinition } from '../../dist/package/util/Immediate'; -import * as Rx from '../../dist/package/Rx'; +import { ImmediateDefinition } from '../../src/util/Immediate'; +import * as Rx from '../../src/Rx'; declare const __root__: any; diff --git a/spec/util/MapPolyfill-spec.ts b/spec/util/MapPolyfill-spec.ts index e165232793..2fcc33fffd 100644 --- a/spec/util/MapPolyfill-spec.ts +++ b/spec/util/MapPolyfill-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { MapPolyfill } from '../../dist/package/util/MapPolyfill'; +import { MapPolyfill } from '../../src/util/MapPolyfill'; /** @test {MapPolyfill} */ describe('MapPolyfill', () => { diff --git a/spec/util/Set-spec.ts b/spec/util/Set-spec.ts index 80623f7612..747e03678a 100644 --- a/spec/util/Set-spec.ts +++ b/spec/util/Set-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { Set as TestSet, minimalSetImpl } from '../../dist/package/util/Set'; +import { Set as TestSet, minimalSetImpl } from '../../src/util/Set'; describe('Set', () => { if (typeof Set === 'function') { diff --git a/spec/util/UnsubscriptionError-spec.ts b/spec/util/UnsubscriptionError-spec.ts index 4736f9ccca..dad0143705 100644 --- a/spec/util/UnsubscriptionError-spec.ts +++ b/spec/util/UnsubscriptionError-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; +import * as Rx from '../../src/Rx'; const { Observable, UnsubscriptionError } = Rx; diff --git a/spec/util/assign-spec.ts b/spec/util/assign-spec.ts index 537f2dff09..34c735f715 100644 --- a/spec/util/assign-spec.ts +++ b/spec/util/assign-spec.ts @@ -1,14 +1,14 @@ import { expect } from 'chai'; -import { assign, getAssign, assignImpl } from '../../dist/package/util/assign'; +import { assign, getAssign, assignImpl } from '../../src/util/assign'; describe('assign', () => { it('should exist', () => { expect(assign).to.be.a('function'); }); - if (Object.assign) { + if ((Object as any).assign) { it('should use Object.assign if available', () => { - expect(assign).to.equal(Object.assign); + expect(assign).to.equal(((Object as any).assign)); }); } diff --git a/spec/util/pipe-spec.ts b/spec/util/pipe-spec.ts index 37c6c083b4..755ef3c76a 100644 --- a/spec/util/pipe-spec.ts +++ b/spec/util/pipe-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { pipe } from '../../dist/package/util/pipe'; +import { pipe } from '../../src/util/pipe'; describe('pipe', () => { it('should exist', () => { diff --git a/spec/util/root-spec.ts b/spec/util/root-spec.ts index 9891483a90..a6c1c58709 100644 --- a/spec/util/root-spec.ts +++ b/spec/util/root-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { root } from '../../dist/package/util/root'; +import { root } from '../../src/util/root'; /** @test {root} */ describe('root', () => { diff --git a/spec/util/subscribeToResult-spec.ts b/spec/util/subscribeToResult-spec.ts index 6972dbceba..d7810c587c 100644 --- a/spec/util/subscribeToResult-spec.ts +++ b/spec/util/subscribeToResult-spec.ts @@ -1,11 +1,11 @@ import { expect } from 'chai'; -import * as Rx from '../../dist/package/Rx'; -import { subscribeToResult } from '../../dist/package/util/subscribeToResult'; -import { OuterSubscriber } from '../../dist/package/OuterSubscriber'; -import { $$iterator } from '../../dist/package/symbol/iterator'; +import * as Rx from '../../src/Rx'; +import { subscribeToResult } from '../../src/util/subscribeToResult'; +import { OuterSubscriber } from '../../src/OuterSubscriber'; +import { $$iterator } from '../../src/symbol/iterator'; import $$symbolObservable from 'symbol-observable'; -import { Observable } from '../../dist/package/Observable'; -import { Subject } from '../../dist/package/Subject'; +import { Observable } from '../../src/Observable'; +import { Subject } from '../../src/Subject'; describe('subscribeToResult', () => { it('should synchronously complete when subscribe to scalarObservable', () => { diff --git a/spec/util/toSubscriber-spec.ts b/spec/util/toSubscriber-spec.ts index e275bf76c4..c285bc56f6 100644 --- a/spec/util/toSubscriber-spec.ts +++ b/spec/util/toSubscriber-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { toSubscriber } from '../../dist/package/util/toSubscriber'; +import { toSubscriber } from '../../src/util/toSubscriber'; describe('toSubscriber', () => { it('should not be closed when other subscriber created with no arguments completes', () => { From 01bc30cf0bb021ef3579f19b5f7a684b85520d0f Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 22 Sep 2017 22:40:25 -0700 Subject: [PATCH 2/8] chore(package): update test scripts --- package.json | 36 +++++++++++++++++++++--------------- wallaby.js | 14 ++------------ 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index b1abf9ca59..398b6fc52f 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,19 @@ "path": "cz-conventional-changelog" } }, + "nyc": { + "exclude": [ + "node_modules", + "typings", + "*.d.ts", + "src/MiscJSDoc.ts", + "**/spec/**/*" + ], + "reporter": [ + "json", + "html" + ] + }, "lint-staged": { "*.@(js)": [ "eslint --fix", @@ -28,11 +41,9 @@ "build_global": "Build Global package, then minify build", "build_perf": "Build CJS & Global build, run macro performance test", "build_test": "Build CJS package & test spec, execute mocha test runner", - "build_cover": "Run lint to current code, build CJS & test spec, execute test coverage", "build_docs": "Build ESM2015 & global package, create documentation using it", "build_spec": "Build test specs", "check_circular_dependencies": "Check codebase has circular dependencies", - "clean_spec": "Clean up existing test spec build output", "clean_dist_cjs": "Clean up existing CJS package output", "clean_dist_esm5": "Clean up existing ESM/ES5 package output", "clean_dist_esm2015": "Clean up existing ESM/ES2015 package output", @@ -68,13 +79,10 @@ "build_global": "npm-run-all clean_dist_global build_esm5_for_rollup && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core clean_dist_esm5_for_rollup", "build_umd": "npm-run-all clean_dist_global && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core", "build_perf": "webdriver-manager update && npm-run-all build_cjs build_global perf", - "build_test": "shx rm -rf ./dist/ && npm-run-all copy_sources build_cjs generate_packages clean_spec build_spec test_mocha", - "build_cover": "shx rm -rf ./dist/ && npm-run-all build_all build_spec cover", - "build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs clean_spec build_spec tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015", + "build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs build_spec tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015", "build_spec": "tsc --project ./spec --pretty", "build_spec_browser": "webpack --config spec/support/webpack.mocha.config.js", "check_circular_dependencies": "madge ./dist/cjs --circular", - "clean_spec": "shx rm -rf spec-js", "clean_dist": "shx rm -rf ./dist", "clean_dist_cjs": "shx rm -rf ./dist/cjs", "clean_dist_esm5": "shx rm -rf ./dist/esm5", @@ -82,12 +90,12 @@ "clean_dist_esm2015": "shx rm -rf ./dist/esm2015", "clean_dist_global": "shx rm -rf ./dist/global", "commit": "git-cz", - "compile_dist_cjs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/operator/toPromise.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --inlineSources --outDir ./dist/cjs --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node -d --declarationDir ./dist/typings", - "compile_dist_esm5": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/operator/toPromise.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5 --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", - "compile_dist_esm2015": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/operator/toPromise.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm2015 --target es2015 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", - "compile_dist_esm2015_for_docs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/MiscJSDoc.ts ./dist/src/operator/toPromise.ts -m es2015 --sourceMap --outDir ./dist/es6 --target es2015 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", - "compile_dist_esm5_for_rollup": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/operator/toPromise.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5_for_rollup --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node --noEmitHelpers", - "copy_sources": "mkdirp dist && shx cp -r ./src/ ./dist/src", + "compile_dist_cjs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/cjs --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node -d --declarationDir ./dist/typings", + "compile_dist_esm5": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5 --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", + "compile_dist_esm2015": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm2015 --target es2015 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", + "compile_dist_esm2015_for_docs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target es2015 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", + "compile_dist_esm5_for_rollup": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5_for_rollup --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node --noEmitHelpers", + "copy_sources": "mkdir -p dist && rsync -a ./src/ ./dist/src", "cover": "shx rm -rf dist/cjs && tsc dist/src/Rx.ts dist/src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --outDir dist/cjs --sourceMap --target ES5 -d && nyc --reporter=lcov --reporter=html --exclude=spec/support/**/* --exclude=spec-js/**/* --exclude=node_modules mocha --opts spec/support/default.opts spec-js", "decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..", "doctoc": "doctoc CONTRIBUTING.md", @@ -100,10 +108,8 @@ "perf_micro": "node ./perf/micro/index.js", "prepublish": "shx rm -rf ./typings && typings install && npm run build_all", "publish_docs": "./publish_docs.sh", - "test_mocha": "mocha --opts spec/support/default.opts spec-js", - "debug_mocha": "node --inspect --debug-brk ./node_modules/.bin/_mocha --opts spec/support/debug.opts spec-js", "test_browser": "npm-run-all build_spec_browser && opn spec/support/mocha-browser-runner.html", - "test": "npm-run-all clean_spec build_spec test_mocha clean_spec", + "test": "shx rm -rf ./.out && tsc && mocha --opts spec/support/default.opts ./.out/spec/**/*-spec.js", "tests2png": "npm run build_spec && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js", "watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15" }, diff --git a/wallaby.js b/wallaby.js index b385c51402..5eb103f06a 100644 --- a/wallaby.js +++ b/wallaby.js @@ -1,7 +1,7 @@ module.exports = wallaby => ({ files: [ 'src/**/*.ts', - {pattern: 'spec/helpers/*.ts', instrument: false} + { pattern: 'spec/helpers/*.ts', instrument: false } ], tests: ['spec/**/*-spec.ts'], @@ -23,19 +23,9 @@ module.exports = wallaby => ({ type: 'node' }, - workers: {initial: 1, regular: 1}, + workers: { initial: 1, regular: 1 }, bootstrap: function (w) { - // Remapping all require calls to `dist/cjs` right to `src` - const Module = require('module').Module; - if (!Module._originalRequire) { - const modulePrototype = Module.prototype; - Module._originalRequire = modulePrototype.require; - modulePrototype.require = function (filePath) { - return Module._originalRequire.call(this, filePath.replace('dist/cjs', 'src')); - }; - } - // Global test helpers global.mocha = require('mocha'); global.Suite = global.mocha.Suite; From 4d74d06396d208adea6eeddb8589a0f3aa3b4af7 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 22 Sep 2017 22:41:05 -0700 Subject: [PATCH 3/8] chore(travis): update travis configuration --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 03890517e4..c000315f7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ install: script: - if [ "$FULL_VALIDATE" == "true" ] && [ -n "DANGER_GITHUB_API_TOKEN" ]; then echo {} > ./.babelrc && npx danger; fi - - npm run build_spec && npm run test_mocha && node ./node_modules/markdown-doctest/bin/cmd.js + - npm test after_success: - if [ "$FULL_VALIDATE" == "true" ]; then npm run cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi From ff92a4d1d271a0824958406096d5ad5b17144576 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 22 Sep 2017 22:41:32 -0700 Subject: [PATCH 4/8] build(tsconfig): update build configuration --- .gitignore | 1 + spec/tsconfig.json | 31 ------------------------------- tsconfig.json | 12 ++++-------- 3 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 spec/tsconfig.json diff --git a/.gitignore b/.gitignore index c85060c547..9ca5ce215d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ coverage/ img/ spec-js/ .nyc_output/ +.out/ # Misc npm-debug.log diff --git a/spec/tsconfig.json b/spec/tsconfig.json deleted file mode 100644 index 5ff1c0faee..0000000000 --- a/spec/tsconfig.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "compilerOptions": { - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "declaration": false, - "allowJs": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "../spec-js", - "lib": [ - "es5", - "es2015.core", - "es2015.collection", - "es2015.iterable", - "es2015.promise", - "dom" - ] - }, - "formatCodeOptions": { - "indentSize": 2, - "tabSize": 2 - }, - "exclude": [ - "support/mocha-setup-node.js", - "support/mocha.sauce.gruntfile.js", - "support/mocha.sauce.runner.js", - "support/webpack.mocha.config.js" - ] -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 8f6585679b..82af808607 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,13 +4,12 @@ "preserveConstEnums": true, "sourceMap": true, "declaration": true, - "noImplicitAny": true, + "noImplicitAny": false, "noImplicitReturns": true, - "noImplicitThis": true, "suppressImplicitAnyIndexErrors": true, "moduleResolution": "node", - "target": "es6", - "outDir": "dist/es6", + "target": "es5", + "outDir": "./.out", "lib": [ "es5", "es2015.iterable", @@ -22,8 +21,5 @@ "formatCodeOptions": { "indentSize": 2, "tabSize": 2 - }, - "files": [ - "src/Rx.ts" - ] + } } \ No newline at end of file From 98e2f16757238c2206d24c6d534f864827423261 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 22 Sep 2017 23:48:07 -0700 Subject: [PATCH 5/8] style(tslint): update lint configuration --- tslint.json | 56 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/tslint.json b/tslint.json index 6bc29dd987..5df698b822 100644 --- a/tslint.json +++ b/tslint.json @@ -2,10 +2,19 @@ "rules": { "curly": true, "eofline": false, - "align": [true, "parameters"], + "align": [ + true, + "parameters" + ], "class-name": true, - "indent": [true, "spaces"], - "max-line-length": [true, 150], + "indent": [ + true, + "spaces" + ], + "max-line-length": [ + true, + 150 + ], "no-consecutive-blank-lines": true, "no-trailing-whitespace": true, "no-duplicate-variable": true, @@ -16,26 +25,39 @@ "no-use-before-declare": true, "no-var-requires": true, "no-require-imports": true, - "one-line": [true, + "one-line": [ + true, "check-else", "check-whitespace", - "check-open-brace"], - "quotemark": [true, + "check-open-brace" + ], + "quotemark": [ + true, "single", - "avoid-escape"], - "semicolon": [true, "always"], - "typedef-whitespace": [true, { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - }], - "whitespace": [true, + "avoid-escape" + ], + "semicolon": [ + true, + "always" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "import-spacing": true, + "whitespace": [ + true, "check-branch", "check-decl", "check-operator", "check-separator", - "check-type"] + "check-type" + ] } } \ No newline at end of file From d1e3f3b9183237f4d93f2a34a6c3088e6a26bb2e Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Sat, 23 Sep 2017 00:10:26 -0700 Subject: [PATCH 6/8] style(From): update code lint, hint friendly --- src/observable/FromObservable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observable/FromObservable.ts b/src/observable/FromObservable.ts index fb8e5a6806..030e70a8cd 100644 --- a/src/observable/FromObservable.ts +++ b/src/observable/FromObservable.ts @@ -2,7 +2,7 @@ import { isArray } from '../util/isArray'; import { isArrayLike } from '../util/isArrayLike'; import { isPromise } from '../util/isPromise'; import { PromiseObservable } from './PromiseObservable'; -import { IteratorObservable } from'./IteratorObservable'; +import { IteratorObservable } from './IteratorObservable'; import { ArrayObservable } from './ArrayObservable'; import { ArrayLikeObservable } from './ArrayLikeObservable'; From 07df85a090e0a9526edc33bbfdefdb986f4e83ac Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Wed, 25 Oct 2017 11:45:11 -0700 Subject: [PATCH 7/8] chore(package): update script for test coverage --- .travis.yml | 2 +- package.json | 25 ++++++++++++++++++------- spec/support/coverage.opts | 9 +++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 spec/support/coverage.opts diff --git a/.travis.yml b/.travis.yml index c000315f7c..8d8485997c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,5 +33,5 @@ script: - npm test after_success: - - if [ "$FULL_VALIDATE" == "true" ]; then npm run cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi + - if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi - if [ "$FULL_VALIDATE" == "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$SAUCE_ACCESS_KEY" ]; then npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js; fi \ No newline at end of file diff --git a/package.json b/package.json index 398b6fc52f..07b12ba50a 100644 --- a/package.json +++ b/package.json @@ -9,17 +9,27 @@ } }, "nyc": { + "include": [ + "src/*.ts", + "src/**/*.ts" + ], "exclude": [ "node_modules", "typings", "*.d.ts", - "src/MiscJSDoc.ts", - "**/spec/**/*" + "src/**/MiscJSDoc.ts" + ], + "extension": [ + ".ts" + ], + "require": [ + "ts-node/register" ], "reporter": [ "json", "html" - ] + ], + "all": true }, "lint-staged": { "*.@(js)": [ @@ -52,7 +62,6 @@ "compile_dist_cjs": "Compile codebase into CJS module", "compile_module_esm5": "Compile codebase into ESM/ES5", "compile_dist_esm2015": "Compile codebase into ESM/ES2015", - "cover": "Execute test coverage", "lint_perf": "Run lint against performance test suite", "lint_spec": "Run lint against test spec", "lint_src": "Run lint against source", @@ -62,6 +71,7 @@ "test_mocha": "Execute mocha test runner against existing test spec build", "test_browser": "Execute mocha test runner on browser against existing test spec build", "test": "Clean up existing test spec build, build test spec and execute mocha test runner", + "test:cover": "Execute test coverage", "tests2png": "Generate marble diagram image from test spec", "watch": "Watch codebase, trigger compile when source code changes" }, @@ -96,7 +106,6 @@ "compile_dist_esm2015_for_docs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target es2015 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", "compile_dist_esm5_for_rollup": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5_for_rollup --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node --noEmitHelpers", "copy_sources": "mkdir -p dist && rsync -a ./src/ ./dist/src", - "cover": "shx rm -rf dist/cjs && tsc dist/src/Rx.ts dist/src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --outDir dist/cjs --sourceMap --target ES5 -d && nyc --reporter=lcov --reporter=html --exclude=spec/support/**/* --exclude=spec-js/**/* --exclude=node_modules mocha --opts spec/support/default.opts spec-js", "decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..", "doctoc": "doctoc CONTRIBUTING.md", "generate_packages": "node .make-packages.js", @@ -109,7 +118,8 @@ "prepublish": "shx rm -rf ./typings && typings install && npm run build_all", "publish_docs": "./publish_docs.sh", "test_browser": "npm-run-all build_spec_browser && opn spec/support/mocha-browser-runner.html", - "test": "shx rm -rf ./.out && tsc && mocha --opts spec/support/default.opts ./.out/spec/**/*-spec.js", + "test": "shx rm -rf ./.out && tsc && mocha --opts spec/support/default.opts '.out/spec/**/*-spec.js'", + "test:cover": "nyc mocha --compilers ts:ts-node/register --opts spec/support/coverage.opts 'spec/**/*-spec.ts'", "tests2png": "npm run build_spec && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js", "watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15" }, @@ -196,7 +206,7 @@ "mocha-in-sauce": "0.0.1", "npm-run-all": "^4.0.2", "npm-scripts-info": "^0.3.4", - "nyc": "^10.2.0", + "nyc": "^11.3.0", "opn-cli": "^3.1.0", "platform": "^1.3.1", "promise": "^7.1.1", @@ -210,6 +220,7 @@ "sinon": "^2.1.0", "sinon-chai": "^2.9.0", "source-map-support": "^0.4.0", + "ts-node": "^3.3.0", "tslib": "^1.5.0", "tslint": "^4.4.2", "typescript": "~2.0.6", diff --git a/spec/support/coverage.opts b/spec/support/coverage.opts new file mode 100644 index 0000000000..36ce4f121b --- /dev/null +++ b/spec/support/coverage.opts @@ -0,0 +1,9 @@ +--require spec/helpers/testScheduler-ui.ts +--ui spec/helpers/testScheduler-ui.ts + +--reporter dot + +--globals WebSocket,FormData,XDomainRequest,ActiveXObject + +--recursive +--timeout 5000 From 8d137ac0a401533f48512b703abc62f3f82ab81f Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Wed, 25 Oct 2017 12:15:44 -0700 Subject: [PATCH 8/8] chore(package): integrate test script --- .travis.yml | 2 +- appveyor.yml | 4 ++-- package.json | 15 +++++++-------- spec/support/coverage.opts | 2 +- spec/support/default.opts | 2 -- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d8485997c..8c81800286 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,5 +33,5 @@ script: - npm test after_success: - - if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi + - if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover && npx nyc report --reporter=text-lcov | npx coveralls; fi - if [ "$FULL_VALIDATE" == "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$SAUCE_ACCESS_KEY" ]; then npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js; fi \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index bcfe9682e5..0cf80ca9ca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,9 +13,9 @@ install: - npm install build_script: - - npm run build_spec + - npm run build_all test_script: - - npm run cover + - npm test version: "{build}" \ No newline at end of file diff --git a/package.json b/package.json index 07b12ba50a..25b5f8c737 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ ], "exclude": [ "node_modules", + "dist", "typings", "*.d.ts", "src/**/MiscJSDoc.ts" @@ -26,7 +27,6 @@ "ts-node/register" ], "reporter": [ - "json", "html" ], "all": true @@ -52,7 +52,6 @@ "build_perf": "Build CJS & Global build, run macro performance test", "build_test": "Build CJS package & test spec, execute mocha test runner", "build_docs": "Build ESM2015 & global package, create documentation using it", - "build_spec": "Build test specs", "check_circular_dependencies": "Check codebase has circular dependencies", "clean_dist_cjs": "Clean up existing CJS package output", "clean_dist_esm5": "Clean up existing ESM/ES5 package output", @@ -89,8 +88,7 @@ "build_global": "npm-run-all clean_dist_global build_esm5_for_rollup && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core clean_dist_esm5_for_rollup", "build_umd": "npm-run-all clean_dist_global && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core", "build_perf": "webdriver-manager update && npm-run-all build_cjs build_global perf", - "build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs build_spec tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015", - "build_spec": "tsc --project ./spec --pretty", + "build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015", "build_spec_browser": "webpack --config spec/support/webpack.mocha.config.js", "check_circular_dependencies": "madge ./dist/cjs --circular", "clean_dist": "shx rm -rf ./dist", @@ -105,7 +103,7 @@ "compile_dist_esm2015": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm2015 --target es2015 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", "compile_dist_esm2015_for_docs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target es2015 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node", "compile_dist_esm5_for_rollup": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5_for_rollup --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node --noEmitHelpers", - "copy_sources": "mkdir -p dist && rsync -a ./src/ ./dist/src", + "copy_sources": "mkdirp dist && shx cp -r ./src/ ./dist/src", "decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..", "doctoc": "doctoc CONTRIBUTING.md", "generate_packages": "node .make-packages.js", @@ -118,9 +116,9 @@ "prepublish": "shx rm -rf ./typings && typings install && npm run build_all", "publish_docs": "./publish_docs.sh", "test_browser": "npm-run-all build_spec_browser && opn spec/support/mocha-browser-runner.html", - "test": "shx rm -rf ./.out && tsc && mocha --opts spec/support/default.opts '.out/spec/**/*-spec.js'", - "test:cover": "nyc mocha --compilers ts:ts-node/register --opts spec/support/coverage.opts 'spec/**/*-spec.ts'", - "tests2png": "npm run build_spec && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js", + "test": "cross-env TS_NODE_FAST=true mocha --compilers ts:ts-node/register --opts spec/support/coverage.opts \"spec/**/*-spec.ts\"", + "test:cover": "cross-env TS_NODE_FAST=true nyc npm test", + "tests2png": "tsc && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js", "watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15" }, "repository": { @@ -181,6 +179,7 @@ "colors": "1.1.2", "commitizen": "^2.8.6", "coveralls": "^2.11.13", + "cross-env": "^5.1.0", "cz-conventional-changelog": "^1.2.0", "danger": "^1.1.0", "doctoc": "^1.0.0", diff --git a/spec/support/coverage.opts b/spec/support/coverage.opts index 36ce4f121b..dd16ba8048 100644 --- a/spec/support/coverage.opts +++ b/spec/support/coverage.opts @@ -6,4 +6,4 @@ --globals WebSocket,FormData,XDomainRequest,ActiveXObject --recursive ---timeout 5000 +--timeout 5000 \ No newline at end of file diff --git a/spec/support/default.opts b/spec/support/default.opts index 419ffe734d..10a6277758 100644 --- a/spec/support/default.opts +++ b/spec/support/default.opts @@ -1,10 +1,8 @@ ---require source-map-support/register --require .out/spec/helpers/testScheduler-ui.js --ui .out/spec/helpers/testScheduler-ui.js --reporter dot ---full-trace --check-leaks --globals WebSocket,FormData,XDomainRequest,ActiveXObject