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

Function createMockPlugin

packages/plugin-axe/src/lib/categories.unit.test.ts:8–17  ·  view source on GitHub ↗
(
    overrides: Partial<Pick<PluginConfig, 'groups' | 'context'>> = {},
  )

Source from the content-addressed store, hash-verified

6
7describe('axeCategories', () => {
8 const createMockPlugin = (
9 overrides: Partial<Pick<PluginConfig, 'groups' | 'context'>> = {},
10 ): Pick<PluginConfig, 'groups' | 'context'> => ({
11 groups: [
12 { slug: 'aria', title: 'ARIA', refs: [] },
13 { slug: 'color', title: 'Color & Contrast', refs: [] },
14 ],
15 context: { urlCount: 1, weights: { 1: 1 } },
16 ...overrides,
17 });
18
19 it('should create accessibility category with all groups', () => {
20 expect(axeCategories(createMockPlugin())).toEqual([

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected