MCPcopy Create free account
hub / github.com/code-pushup/cli / expandCategories

Function expandCategories

packages/plugin-axe/src/lib/categories.ts:56–67  ·  view source on GitHub ↗
(
  plugin: Pick<PluginConfig, 'context'>,
  categories: CategoryConfig[],
)

Source from the content-addressed store, hash-verified

54}
55
56function expandCategories(
57 plugin: Pick<PluginConfig, 'context'>,
58 categories: CategoryConfig[],
59): CategoryConfig[] {
60 const context = validate(pluginUrlContextSchema, plugin.context);
61 if (!shouldExpandForUrls(context.urlCount)) {
62 return categories;
63 }
64 return categories.map(category =>
65 expandAggregatedCategory(category, context),
66 );
67}
68
69export function expandAggregatedCategory(
70 category: CategoryConfig,

Callers 1

axeCategoriesFunction · 0.70

Calls 3

validateFunction · 0.90
shouldExpandForUrlsFunction · 0.90
expandAggregatedCategoryFunction · 0.70

Tested by

no test coverage detected