@hirez_io/observer-spy
Version:
A simple little class that helps making Observable testing a breeze
19 lines • 889 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.subscribeAndSpyOn = exports.subscribeSpyTo = void 0;
var auto_unsubscribe_1 = require("./auto-unsubscribe");
var subscriber_spy_1 = require("./subscriber-spy");
function subscribeSpyTo(observableUnderTest, config) {
var spy = new subscriber_spy_1.SubscriberSpy(observableUnderTest, config);
(0, auto_unsubscribe_1.queueForAutoUnsubscribe)(spy);
return spy;
}
exports.subscribeSpyTo = subscribeSpyTo;
/* istanbul ignore next */
function subscribeAndSpyOn(observableUnderTest) {
// tslint:disable-next-line:no-console
console.warn('subscribeAndSpyOn is deprecated and will be removed in the next version, please use "subscribeSpyTo" instead.');
return subscribeSpyTo(observableUnderTest);
}
exports.subscribeAndSpyOn = subscribeAndSpyOn;
//# sourceMappingURL=subscribe-spy-to.js.map