Type alias QueryType<Component>

QueryType<Component>: {
    className?: string;
    component?: Component;
    props?: Record<string, unknown>;
}

Parameters for searching for elements

Type Parameters

  • Component extends keyof JSX.IntrinsicElements | ComponentType<any>

Type declaration

  • Optional className?: string

    Classname that the target elements should have

    search(
    <button
    className="foo bar baz"
    >
    Test
    </button>,
    {
    className: 'bar',
    },
    )
  • Optional component?: Component

    Type of jsx node. E.g.

    search(<button>Test</button>, {
    component: 'button',
    })

    search(<MyComponent>Test</MyComponent>, {
    component: MyComponent,
    })
  • Optional props?: Record<string, unknown>

    Props that the target elements should have

    search(
    <button type="button">
    Test
    </button>,
    {
    type: 'button',
    },
    )

Generated using TypeDoc