UNPKG

1.05 kBTypeScriptView Raw
1import React from 'react';
2import { StoryConfig } from '../index';
3/**
4 *
5 * This function will generate a11y tests based on the component and the component
6 * example definition json.
7 * It will enumerate over the generated component examples and will call the
8 * `.accessible()` function on it.
9 *
10 * ```js
11 * const subject = await mount(<Example />)
12 const element = within(subject.getDOMNode())
13
14 expect(await element.accessible()).to.be.true()
15 * ```
16 * @param Component - The base Component
17 * @param componentExample - The example definition json, this will be the basis for the prop
18 * combination generation.
19 * @param ariaRulesToIgnore - ARIA rules to ignore. these must be one of the
20 * rules described here: https://dequeuniversity.com/rules/axe/4.4
21 *
22 * @module generateA11yTests
23 * @private
24 */
25export declare function generateA11yTests<Props extends Record<string, any>>(Component: React.ComponentType<any>, componentExample: StoryConfig<Props>, ariaRulesToIgnore?: string[]): void;
26//# sourceMappingURL=generateA11yTests.d.ts.map
\No newline at end of file