MCPcopy Index your code
hub / github.com/code-pushup/cli / formatPluginCall

Function formatPluginCall

packages/plugin-lighthouse/src/lib/binding.ts:122–132  ·  view source on GitHub ↗
({ urls, categories }: LighthouseOptions)

Source from the content-addressed store, hash-verified

120}
121
122function formatPluginCall({ urls, categories }: LighthouseOptions): string {
123 const formattedUrls = formatUrls(urls);
124 const groups = CATEGORIES.filter(({ slug }) => categories.includes(slug)).map(
125 ({ group }) => group,
126 );
127 if (groups.length === 0 || groups.length === LIGHTHOUSE_GROUP_SLUGS.length) {
128 return `lighthousePlugin(${formattedUrls})`;
129 }
130 const onlyGroups = groups.map(singleQuote).join(', ');
131 return `lighthousePlugin(${formattedUrls}, { onlyGroups: [${onlyGroups}] })`;
132}
133
134function createCategories({
135 categories,

Callers 1

binding.tsFile · 0.70

Calls 1

formatUrlsFunction · 0.70

Tested by

no test coverage detected