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

Function createCategoryGroups

packages/plugin-axe/src/lib/meta/transform.ts:64–71  ·  view source on GitHub ↗
(rules: axe.RuleMetadata[])

Source from the content-addressed store, hash-verified

62}
63
64function createCategoryGroups(rules: axe.RuleMetadata[]): Group[] {
65 return objectToEntries(CATEGORY_GROUPS).map(([slug, title]) => {
66 const tag = `cat.${slug}`;
67 const categoryRules = rules.filter(({ tags }) => tags.includes(tag));
68
69 return createGroup(slug, title, categoryRules);
70 });
71}

Callers 1

transformRulesToGroupsFunction · 0.85

Calls 2

objectToEntriesFunction · 0.90
createGroupFunction · 0.85

Tested by

no test coverage detected