Skip to content

axe-core timeout with mock timer in JS unit tests #3055

Open
@mohanraj-r

Description

@mohanraj-r

Product: axe-core

Expectation: axe-core does not timeout when timer is mocked in JS unit tests

Actual: When mock timers are used with axe (e.g. jest.useFakeTimers()), tests fail with error "Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout"

Motivation: Mocking timers are common in JS unit tests. Getting axe-core to work as expected even when mock timers are being used would be great. The timeout issue occurs even with other third-party mock timer libs such as @sinonjs/fake-timers - so it is not a problem just with Jest.


axe-core version: 4.2.3

For Tooling issues:
- Node version: v14.17.1
- Platform:  OSX 10.15.7

Something about mocking timers results in axe timeout - not sure why ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe welcome PRs or discussions for issues marked as help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions