UNPKG

jest-metadata

Version:

🦸‍♂️ Superhero power for your Jest reporters! 🦸‍♀️

31 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Shallow = void 0; const tslib_1 = require("tslib"); const node_path_1 = tslib_1.__importDefault(require("node:path")); exports.Shallow = { testCaseResult(testCaseResult) { return { status: testCaseResult.status, title: testCaseResult.title, ancestorTitles: testCaseResult.ancestorTitles, invocations: testCaseResult.invocations, }; }, testResult(testResult) { return { testFilePath: node_path_1.default .relative(process.cwd(), testResult.testFilePath) .replaceAll(node_path_1.default.win32.sep, node_path_1.default.posix.sep), testResults: testResult.testResults.map(exports.Shallow.testCaseResult), }; }, aggregatedResult(aggregatedResult) { return { testResults: aggregatedResult.testResults.map(exports.Shallow.testResult).sort((a, b) => { return a.testFilePath.localeCompare(b.testFilePath); }), }; }, }; //# sourceMappingURL=Shallow.js.map