Rocky_Mountain_Vending/.pnpm-store/v10/files/33/3833e3037512c70bd37d48ed18abab481c4bc19f2a327e2359abe2fc5abf508807ed4d9f1da1eaa9c11ded8473a9536b6be75dc1d3e5525cfd229929294b77
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

41 lines
1.1 KiB
Text

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* COMPAT: update from the old TestDefn format (array of `expectations` per
* definition) to the new format (single `expectations` per def), doing our best
* generating some unique IDs.
* TODO: remove in Lighthouse 9+ once PubAds (and others?) are updated.
* @see https://github.com/GoogleChrome/lighthouse/issues/11950
* @param {ReadonlyArray<Smokehouse.BackCompatTestDefn>} allTestDefns
* @return {Array<Smokehouse.TestDfn>}
*/
function updateTestDefnFormat(allTestDefns) {
const expandedTestDefns = allTestDefns.map(testDefn => {
if (Array.isArray(testDefn.expectations)) {
// Create a testDefn per expectation.
return testDefn.expectations.map((expectations, index) => {
return {
...testDefn,
id: `${testDefn.id}-${index}`,
expectations,
};
});
} else {
// New object to make tsc happy.
return {
...testDefn,
expectations: testDefn.expectations,
};
}
});
return expandedTestDefns.flat();
}
export {
updateTestDefnFormat,
};