e2ed
Version:
E2E testing framework over Playwright
18 lines (17 loc) • 707 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderStyle = void 0;
const node_fs_1 = require("node:fs");
const node_path_1 = require("node:path");
const internal_1 = require("../../../constants/internal");
const client_1 = require("../client");
/**
* Renders tag `<style>` with all CSS styles.
* @internal
*/
const renderStyle = () => {
const pathToCss = (0, node_path_1.join)(internal_1.INSTALLED_E2ED_DIRECTORY_PATH, 'styles', 'report.css');
const cssString = (0, node_fs_1.readFileSync)(pathToCss, internal_1.READ_FILE_OPTIONS);
return (0, client_1.createSafeHtmlWithoutSanitize) `<style>${cssString}</style>`;
};
exports.renderStyle = renderStyle;