UNPKG

@instructure/ui-test-utils

Version:

A UI testing library made by Instructure Inc.

26 lines (25 loc) 1.05 kB
import React from 'react'; import { StoryConfig } from '../index'; /** * * This function will generate a11y tests based on the component and the component * example definition json. * It will enumerate over the generated component examples and will call the * `.accessible()` function on it. * * ```js * const subject = await mount(<Example />) const element = within(subject.getDOMNode()) expect(await element.accessible()).to.be.true() * ``` * @param Component - The base Component * @param componentExample - The example definition json, this will be the basis for the prop * combination generation. * @param ariaRulesToIgnore - ARIA rules to ignore. these must be one of the * rules described here: https://dequeuniversity.com/rules/axe/4.4 * * @module generateA11yTests * @private */ export declare function generateA11yTests<Props extends Record<string, any>>(Component: React.ComponentType<any>, componentExample: StoryConfig<Props>, ariaRulesToIgnore?: string[]): void; //# sourceMappingURL=generateA11yTests.d.ts.map