e2ed
Version:
E2E testing framework over Playwright
20 lines (19 loc) • 934 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.showLogAboutLogFile = void 0;
const node_path_1 = require("node:path");
const internal_1 = require("../../constants/internal");
const fs_1 = require("../fs");
const generalLog_1 = require("../generalLog");
const getFileSizeInMb_1 = require("../getFileSizeInMb");
/**
* Shows log about log file (`pack-logs.log`).
* @internal
*/
const showLogAboutLogFile = async (logFileName) => {
const logFilePath = (0, node_path_1.join)(internal_1.ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY, internal_1.REPORTS_DIRECTORY_PATH, logFileName);
const logFileSizeInBytes = await (0, fs_1.getFileSize)(logFilePath);
const logFileSizeInMb = (0, getFileSizeInMb_1.getFileSizeInMb)(logFileSizeInBytes);
(0, generalLog_1.generalLog)(`Logs were written (${logFileSizeInMb}) to "file://${logFilePath}"`);
};
exports.showLogAboutLogFile = showLogAboutLogFile;