e2ed
Version:
E2E testing framework over Playwright
15 lines (14 loc) • 581 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.readGlobalErrors = void 0;
const promises_1 = require("node:fs/promises");
const internal_1 = require("../../constants/internal");
/**
* Reads global errors of run from directory.
* @internal
*/
const readGlobalErrors = async () => {
const globalErrorsJsonString = await (0, promises_1.readFile)(internal_1.GLOBAL_ERRORS_PATH, internal_1.READ_FILE_OPTIONS).catch(() => '');
return JSON.parse(`[${globalErrorsJsonString.slice(0, -2)}]`);
};
exports.readGlobalErrors = readGlobalErrors;