UNPKG

@sa11y/jest

Version:
21 lines 835 B
/// <reference types="jest" /> import { A11yCheckableContext } from '@sa11y/assert'; import { A11yConfig } from '@sa11y/common'; declare global { namespace jest { interface Matchers<R> extends jest.CustomMatcher { toBeAccessible(config?: A11yConfig): Promise<CustomMatcherResult>; } } } /** * Detect if fake timer is being used in a jest test. * Fake timers result in axe timeout https://github.com/dequelabs/axe-core/issues/3055 * Workaround until underlying issue can be fixed in axe. * Ref: https://github.com/facebook/jest/issues/10555 */ export declare function isTestUsingFakeTimer(): boolean; export declare function toBeAccessible(received?: A11yCheckableContext, config?: A11yConfig): Promise<jest.CustomMatcherResult & { a11yError: Error; }>; //# sourceMappingURL=matcher.d.ts.map