UNPKG

dockest

Version:

Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.

16 lines 785 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createDockerServiceEventStream = void 0; const rxjs_1 = require("rxjs"); const operators_1 = require("rxjs/operators"); const createDockerServiceEventStream = (serviceName, eventEmitter) => { return ((0, rxjs_1.fromEventPattern)((handler) => { eventEmitter.addListener(serviceName, handler); }, (handler) => { eventEmitter.removeListener(serviceName, handler); }) // Every new subscriber should receive access to all previous emitted events, because of this we use shareReplay. .pipe((0, operators_1.shareReplay)())); }; exports.createDockerServiceEventStream = createDockerServiceEventStream; //# sourceMappingURL=create-docker-service-event-stream.js.map