UNPKG

e2ed

Version:

E2E testing framework over Playwright

10 lines (9 loc) 507 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.waitForAllProperties = void 0; /** * Waits for all object properties are resolved, * and returns an object with those properties and their values. */ const waitForAllProperties = async (promiseObject) => Object.fromEntries(await Promise.all(Object.entries(promiseObject).map(([key, maybePromise]) => Promise.resolve(maybePromise).then((result) => [key, result])))); exports.waitForAllProperties = waitForAllProperties;