UNPKG

dockest

Version:

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

17 lines 901 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.writeComposeFile = void 0; const fs_1 = __importDefault(require("fs")); const constants_1 = require("../../constants"); const writeComposeFile = (mergedComposeFiles, composeFileAsObject) => { // set environment variable that can be used with the test-helpers // jest.runCLI will pass this environment variable into the testcase runners process.env[constants_1.DOCKEST_ATTACH_TO_PROCESS] = JSON.stringify(composeFileAsObject); fs_1.default.writeFileSync(constants_1.GENERATED_COMPOSE_FILE_PATH, mergedComposeFiles); return constants_1.GENERATED_COMPOSE_FILE_PATH; }; exports.writeComposeFile = writeComposeFile; //# sourceMappingURL=write-compose-file.js.map