mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2025-10-11 23:25:00 +00:00
structure, layout and automation
This commit is contained in:
47
node_modules/rxjs/_esm5/testing/ColdObservable.js
generated
vendored
Normal file
47
node_modules/rxjs/_esm5/testing/ColdObservable.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._Subscription,._SubscriptionLoggable,.._util_applyMixins PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { SubscriptionLoggable } from './SubscriptionLoggable';
|
||||
import { applyMixins } from '../util/applyMixins';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var ColdObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ColdObservable, _super);
|
||||
function ColdObservable(messages, scheduler) {
|
||||
_super.call(this, function (subscriber) {
|
||||
var observable = this;
|
||||
var index = observable.logSubscribedFrame();
|
||||
subscriber.add(new Subscription(function () {
|
||||
observable.logUnsubscribedFrame(index);
|
||||
}));
|
||||
observable.scheduleMessages(subscriber);
|
||||
return subscriber;
|
||||
});
|
||||
this.messages = messages;
|
||||
this.subscriptions = [];
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
ColdObservable.prototype.scheduleMessages = function (subscriber) {
|
||||
var messagesLength = this.messages.length;
|
||||
for (var i = 0; i < messagesLength; i++) {
|
||||
var message = this.messages[i];
|
||||
subscriber.add(this.scheduler.schedule(function (_a) {
|
||||
var message = _a.message, subscriber = _a.subscriber;
|
||||
message.notification.observe(subscriber);
|
||||
}, message.frame, { message: message, subscriber: subscriber }));
|
||||
}
|
||||
};
|
||||
return ColdObservable;
|
||||
}(Observable));
|
||||
/*@__PURE__*/ applyMixins(ColdObservable, [SubscriptionLoggable]);
|
||||
//# sourceMappingURL=ColdObservable.js.map
|
1
node_modules/rxjs/_esm5/testing/ColdObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/ColdObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../src/testing/ColdObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,YAAY,EAAE,MAAM,iBAAiB;OAIvC,EAAE,oBAAoB,EAAE,MAAM,wBAAwB;OACtD,EAAE,WAAW,EAAE,MAAM,qBAAqB;AAGjD;;;;GAIG;AACH;IAAuC,kCAAa;IAMlD,wBAAmB,QAAuB,EAC9B,SAAoB;QAC9B,kBAAM,UAAmC,UAA2B;YAClE,IAAM,UAAU,GAAsB,IAAI,CAAC;YAC3C,IAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,UAAU,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC;gBAC9B,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC,CAAC;YACJ,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,MAAM,CAAC,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;QAVc,aAAQ,GAAR,QAAQ,CAAe;QALnC,kBAAa,GAAsB,EAAE,CAAC;QAgB3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,yCAAgB,GAAhB,UAAiB,UAA2B;QAC1C,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAC,EAAqB;oBAApB,oBAAO,EAAE,0BAAU;gBAAQ,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAAC,CAAC,EAC9F,OAAO,CAAC,KAAK,EACb,EAAC,gBAAO,EAAE,sBAAU,EAAC,CAAC,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AA/BD,CAAuC,UAAU,GA+BhD;AACD,WAAW,CAAC,cAAc,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"}
|
49
node_modules/rxjs/_esm5/testing/HotObservable.js
generated
vendored
Normal file
49
node_modules/rxjs/_esm5/testing/HotObservable.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/** PURE_IMPORTS_START .._Subject,.._Subscription,._SubscriptionLoggable,.._util_applyMixins PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subject } from '../Subject';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { SubscriptionLoggable } from './SubscriptionLoggable';
|
||||
import { applyMixins } from '../util/applyMixins';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var HotObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(HotObservable, _super);
|
||||
function HotObservable(messages, scheduler) {
|
||||
_super.call(this);
|
||||
this.messages = messages;
|
||||
this.subscriptions = [];
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/** @deprecated internal use only */ HotObservable.prototype._subscribe = function (subscriber) {
|
||||
var subject = this;
|
||||
var index = subject.logSubscribedFrame();
|
||||
subscriber.add(new Subscription(function () {
|
||||
subject.logUnsubscribedFrame(index);
|
||||
}));
|
||||
return _super.prototype._subscribe.call(this, subscriber);
|
||||
};
|
||||
HotObservable.prototype.setup = function () {
|
||||
var subject = this;
|
||||
var messagesLength = subject.messages.length;
|
||||
/* tslint:disable:no-var-keyword */
|
||||
for (var i = 0; i < messagesLength; i++) {
|
||||
(function () {
|
||||
var message = subject.messages[i];
|
||||
/* tslint:enable */
|
||||
subject.scheduler.schedule(function () { message.notification.observe(subject); }, message.frame);
|
||||
})();
|
||||
}
|
||||
};
|
||||
return HotObservable;
|
||||
}(Subject));
|
||||
/*@__PURE__*/ applyMixins(HotObservable, [SubscriptionLoggable]);
|
||||
//# sourceMappingURL=HotObservable.js.map
|
1
node_modules/rxjs/_esm5/testing/HotObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/HotObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../src/testing/HotObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,OAAO,EAAE,MAAM,YAAY;OAE7B,EAAE,YAAY,EAAE,MAAM,iBAAiB;OAIvC,EAAE,oBAAoB,EAAE,MAAM,wBAAwB;OACtD,EAAE,WAAW,EAAE,MAAM,qBAAqB;AAEjD;;;;GAIG;AACH;IAAsC,iCAAU;IAM9C,uBAAmB,QAAuB,EAC9B,SAAoB;QAC9B,iBAAO,CAAC;QAFS,aAAQ,GAAR,QAAQ,CAAe;QALnC,kBAAa,GAAsB,EAAE,CAAC;QAQ3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,oCAAoC,CAAC,kCAAU,GAAV,UAAW,UAA2B;QACzE,IAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,IAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,UAAU,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC;YAC9B,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC,CAAC;QACJ,MAAM,CAAC,gBAAK,CAAC,UAAU,YAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,6BAAK,GAAL;QACE,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC/C,mCAAmC;QACnC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,CAAC;gBACC,IAAI,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACvC,mBAAmB;gBACd,OAAO,CAAC,SAAS,CAAC,QAAQ,CACxB,cAAQ,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,CAAC,KAAK,CACd,CAAC;YACJ,CAAC,CAAC,EAAE,CAAC;QACP,CAAC;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AApCD,CAAsC,OAAO,GAoC5C;AACD,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"}
|
11
node_modules/rxjs/_esm5/testing/SubscriptionLog.js
generated
vendored
Normal file
11
node_modules/rxjs/_esm5/testing/SubscriptionLog.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export var SubscriptionLog = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function SubscriptionLog(subscribedFrame, unsubscribedFrame) {
|
||||
if (unsubscribedFrame === void 0) {
|
||||
unsubscribedFrame = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
this.subscribedFrame = subscribedFrame;
|
||||
this.unsubscribedFrame = unsubscribedFrame;
|
||||
}
|
||||
return SubscriptionLog;
|
||||
}());
|
||||
//# sourceMappingURL=SubscriptionLog.js.map
|
1
node_modules/rxjs/_esm5/testing/SubscriptionLog.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/SubscriptionLog.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../src/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA;IACE,yBAAmB,eAAuB,EACvB,iBAAoD;QAA3D,iCAA2D,GAA3D,oBAAmC,MAAM,CAAC,iBAAiB;QADpD,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmC;IACvE,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC"}
|
18
node_modules/rxjs/_esm5/testing/SubscriptionLoggable.js
generated
vendored
Normal file
18
node_modules/rxjs/_esm5/testing/SubscriptionLoggable.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/** PURE_IMPORTS_START ._SubscriptionLog PURE_IMPORTS_END */
|
||||
import { SubscriptionLog } from './SubscriptionLog';
|
||||
export var SubscriptionLoggable = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function SubscriptionLoggable() {
|
||||
this.subscriptions = [];
|
||||
}
|
||||
SubscriptionLoggable.prototype.logSubscribedFrame = function () {
|
||||
this.subscriptions.push(new SubscriptionLog(this.scheduler.now()));
|
||||
return this.subscriptions.length - 1;
|
||||
};
|
||||
SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) {
|
||||
var subscriptionLogs = this.subscriptions;
|
||||
var oldSubscriptionLog = subscriptionLogs[index];
|
||||
subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now());
|
||||
};
|
||||
return SubscriptionLoggable;
|
||||
}());
|
||||
//# sourceMappingURL=SubscriptionLoggable.js.map
|
1
node_modules/rxjs/_esm5/testing/SubscriptionLoggable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/SubscriptionLoggable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../src/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"OACO,EAAE,eAAe,EAAE,MAAM,mBAAmB;AAEnD;IAAA;QACS,kBAAa,GAAsB,EAAE,CAAC;IAgB/C,CAAC;IAbC,iDAAkB,GAAlB;QACE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAa;QAChC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AAjBD,IAiBC"}
|
1
node_modules/rxjs/_esm5/testing/TestMessage.js
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/TestMessage.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
//# sourceMappingURL=TestMessage.js.map
|
1
node_modules/rxjs/_esm5/testing/TestMessage.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/TestMessage.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../src/testing/TestMessage.ts"],"names":[],"mappings":""}
|
228
node_modules/rxjs/_esm5/testing/TestScheduler.js
generated
vendored
Normal file
228
node_modules/rxjs/_esm5/testing/TestScheduler.js
generated
vendored
Normal file
@ -0,0 +1,228 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._Notification,._ColdObservable,._HotObservable,._SubscriptionLog,.._scheduler_VirtualTimeScheduler PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { Notification } from '../Notification';
|
||||
import { ColdObservable } from './ColdObservable';
|
||||
import { HotObservable } from './HotObservable';
|
||||
import { SubscriptionLog } from './SubscriptionLog';
|
||||
import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler';
|
||||
var defaultMaxFrame = 750;
|
||||
export var TestScheduler = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(TestScheduler, _super);
|
||||
function TestScheduler(assertDeepEqual) {
|
||||
_super.call(this, VirtualAction, defaultMaxFrame);
|
||||
this.assertDeepEqual = assertDeepEqual;
|
||||
this.hotObservables = [];
|
||||
this.coldObservables = [];
|
||||
this.flushTests = [];
|
||||
}
|
||||
TestScheduler.prototype.createTime = function (marbles) {
|
||||
var indexOf = marbles.indexOf('|');
|
||||
if (indexOf === -1) {
|
||||
throw new Error('marble diagram for time should have a completion marker "|"');
|
||||
}
|
||||
return indexOf * TestScheduler.frameTimeFactor;
|
||||
};
|
||||
TestScheduler.prototype.createColdObservable = function (marbles, values, error) {
|
||||
if (marbles.indexOf('^') !== -1) {
|
||||
throw new Error('cold observable cannot have subscription offset "^"');
|
||||
}
|
||||
if (marbles.indexOf('!') !== -1) {
|
||||
throw new Error('cold observable cannot have unsubscription marker "!"');
|
||||
}
|
||||
var messages = TestScheduler.parseMarbles(marbles, values, error);
|
||||
var cold = new ColdObservable(messages, this);
|
||||
this.coldObservables.push(cold);
|
||||
return cold;
|
||||
};
|
||||
TestScheduler.prototype.createHotObservable = function (marbles, values, error) {
|
||||
if (marbles.indexOf('!') !== -1) {
|
||||
throw new Error('hot observable cannot have unsubscription marker "!"');
|
||||
}
|
||||
var messages = TestScheduler.parseMarbles(marbles, values, error);
|
||||
var subject = new HotObservable(messages, this);
|
||||
this.hotObservables.push(subject);
|
||||
return subject;
|
||||
};
|
||||
TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) {
|
||||
var _this = this;
|
||||
var messages = [];
|
||||
observable.subscribe(function (value) {
|
||||
messages.push({ frame: _this.frame - outerFrame, notification: Notification.createNext(value) });
|
||||
}, function (err) {
|
||||
messages.push({ frame: _this.frame - outerFrame, notification: Notification.createError(err) });
|
||||
}, function () {
|
||||
messages.push({ frame: _this.frame - outerFrame, notification: Notification.createComplete() });
|
||||
});
|
||||
return messages;
|
||||
};
|
||||
TestScheduler.prototype.expectObservable = function (observable, unsubscriptionMarbles) {
|
||||
var _this = this;
|
||||
if (unsubscriptionMarbles === void 0) {
|
||||
unsubscriptionMarbles = null;
|
||||
}
|
||||
var actual = [];
|
||||
var flushTest = { actual: actual, ready: false };
|
||||
var unsubscriptionFrame = TestScheduler
|
||||
.parseMarblesAsSubscriptions(unsubscriptionMarbles).unsubscribedFrame;
|
||||
var subscription;
|
||||
this.schedule(function () {
|
||||
subscription = observable.subscribe(function (x) {
|
||||
var value = x;
|
||||
// Support Observable-of-Observables
|
||||
if (x instanceof Observable) {
|
||||
value = _this.materializeInnerObservable(value, _this.frame);
|
||||
}
|
||||
actual.push({ frame: _this.frame, notification: Notification.createNext(value) });
|
||||
}, function (err) {
|
||||
actual.push({ frame: _this.frame, notification: Notification.createError(err) });
|
||||
}, function () {
|
||||
actual.push({ frame: _this.frame, notification: Notification.createComplete() });
|
||||
});
|
||||
}, 0);
|
||||
if (unsubscriptionFrame !== Number.POSITIVE_INFINITY) {
|
||||
this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame);
|
||||
}
|
||||
this.flushTests.push(flushTest);
|
||||
return {
|
||||
toBe: function (marbles, values, errorValue) {
|
||||
flushTest.ready = true;
|
||||
flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true);
|
||||
}
|
||||
};
|
||||
};
|
||||
TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) {
|
||||
var flushTest = { actual: actualSubscriptionLogs, ready: false };
|
||||
this.flushTests.push(flushTest);
|
||||
return {
|
||||
toBe: function (marbles) {
|
||||
var marblesArray = (typeof marbles === 'string') ? [marbles] : marbles;
|
||||
flushTest.ready = true;
|
||||
flushTest.expected = marblesArray.map(function (marbles) {
|
||||
return TestScheduler.parseMarblesAsSubscriptions(marbles);
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
TestScheduler.prototype.flush = function () {
|
||||
var hotObservables = this.hotObservables;
|
||||
while (hotObservables.length > 0) {
|
||||
hotObservables.shift().setup();
|
||||
}
|
||||
_super.prototype.flush.call(this);
|
||||
var readyFlushTests = this.flushTests.filter(function (test) { return test.ready; });
|
||||
while (readyFlushTests.length > 0) {
|
||||
var test = readyFlushTests.shift();
|
||||
this.assertDeepEqual(test.actual, test.expected);
|
||||
}
|
||||
};
|
||||
TestScheduler.parseMarblesAsSubscriptions = function (marbles) {
|
||||
if (typeof marbles !== 'string') {
|
||||
return new SubscriptionLog(Number.POSITIVE_INFINITY);
|
||||
}
|
||||
var len = marbles.length;
|
||||
var groupStart = -1;
|
||||
var subscriptionFrame = Number.POSITIVE_INFINITY;
|
||||
var unsubscriptionFrame = Number.POSITIVE_INFINITY;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var frame = i * this.frameTimeFactor;
|
||||
var c = marbles[i];
|
||||
switch (c) {
|
||||
case '-':
|
||||
case ' ':
|
||||
break;
|
||||
case '(':
|
||||
groupStart = frame;
|
||||
break;
|
||||
case ')':
|
||||
groupStart = -1;
|
||||
break;
|
||||
case '^':
|
||||
if (subscriptionFrame !== Number.POSITIVE_INFINITY) {
|
||||
throw new Error('found a second subscription point \'^\' in a ' +
|
||||
'subscription marble diagram. There can only be one.');
|
||||
}
|
||||
subscriptionFrame = groupStart > -1 ? groupStart : frame;
|
||||
break;
|
||||
case '!':
|
||||
if (unsubscriptionFrame !== Number.POSITIVE_INFINITY) {
|
||||
throw new Error('found a second subscription point \'^\' in a ' +
|
||||
'subscription marble diagram. There can only be one.');
|
||||
}
|
||||
unsubscriptionFrame = groupStart > -1 ? groupStart : frame;
|
||||
break;
|
||||
default:
|
||||
throw new Error('there can only be \'^\' and \'!\' markers in a ' +
|
||||
'subscription marble diagram. Found instead \'' + c + '\'.');
|
||||
}
|
||||
}
|
||||
if (unsubscriptionFrame < 0) {
|
||||
return new SubscriptionLog(subscriptionFrame);
|
||||
}
|
||||
else {
|
||||
return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame);
|
||||
}
|
||||
};
|
||||
TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables) {
|
||||
if (materializeInnerObservables === void 0) {
|
||||
materializeInnerObservables = false;
|
||||
}
|
||||
if (marbles.indexOf('!') !== -1) {
|
||||
throw new Error('conventional marble diagrams cannot have the ' +
|
||||
'unsubscription marker "!"');
|
||||
}
|
||||
var len = marbles.length;
|
||||
var testMessages = [];
|
||||
var subIndex = marbles.indexOf('^');
|
||||
var frameOffset = subIndex === -1 ? 0 : (subIndex * -this.frameTimeFactor);
|
||||
var getValue = typeof values !== 'object' ?
|
||||
function (x) { return x; } :
|
||||
function (x) {
|
||||
// Support Observable-of-Observables
|
||||
if (materializeInnerObservables && values[x] instanceof ColdObservable) {
|
||||
return values[x].messages;
|
||||
}
|
||||
return values[x];
|
||||
};
|
||||
var groupStart = -1;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var frame = i * this.frameTimeFactor + frameOffset;
|
||||
var notification = void 0;
|
||||
var c = marbles[i];
|
||||
switch (c) {
|
||||
case '-':
|
||||
case ' ':
|
||||
break;
|
||||
case '(':
|
||||
groupStart = frame;
|
||||
break;
|
||||
case ')':
|
||||
groupStart = -1;
|
||||
break;
|
||||
case '|':
|
||||
notification = Notification.createComplete();
|
||||
break;
|
||||
case '^':
|
||||
break;
|
||||
case '#':
|
||||
notification = Notification.createError(errorValue || 'error');
|
||||
break;
|
||||
default:
|
||||
notification = Notification.createNext(getValue(c));
|
||||
break;
|
||||
}
|
||||
if (notification) {
|
||||
testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification });
|
||||
}
|
||||
}
|
||||
return testMessages;
|
||||
};
|
||||
return TestScheduler;
|
||||
}(VirtualTimeScheduler));
|
||||
//# sourceMappingURL=TestScheduler.js.map
|
1
node_modules/rxjs/_esm5/testing/TestScheduler.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/testing/TestScheduler.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user