UNPKG

e2ed

Version:

E2E testing framework over Playwright

19 lines (18 loc) 552 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.flatLogEvents = void 0; /** * Flats array of log events with children to flat array. * @internal */ const flatLogEvents = (logEvents) => { const result = []; for (const logEvent of logEvents) { result.push(logEvent); if (logEvent.children !== undefined && logEvent.children.length > 0) { result.push(...(0, exports.flatLogEvents)(logEvent.children)); } } return result; }; exports.flatLogEvents = flatLogEvents;