UNPKG

e2ed

Version:

E2E testing framework over Playwright

17 lines (16 loc) 623 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTestIdByTestFilePath = void 0; const promises_1 = require("node:fs/promises"); const internal_1 = require("../../constants/internal"); const getHash_1 = require("../getHash"); /** * Get `testId` by `testFilePath`. * @internal */ const getTestIdByTestFilePath = async (testFilePath) => { const testFileContent = await (0, promises_1.readFile)(testFilePath, internal_1.READ_FILE_OPTIONS); const testId = (0, getHash_1.getHash)(testFileContent); return testId; }; exports.getTestIdByTestFilePath = getTestIdByTestFilePath;