UNPKG

testcontainers

Version:

Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container

17 lines 672 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.attachContainer = void 0; const demux_stream_1 = require("./demux-stream"); const common_1 = require("../../common"); const attachContainer = async (dockerode, container) => { try { const stream = (await container.attach({ stream: true, stdout: true, stderr: true })); return (0, demux_stream_1.demuxStream)(dockerode, stream); } catch (err) { common_1.log.error(`Failed to attach to container: ${err}`, { containerId: container.id }); throw err; } }; exports.attachContainer = attachContainer; //# sourceMappingURL=attach-container.js.map