dequelabs/axe-core

axe-core timeout with mock timer in JS unit tests

オープン

#3,055 opened on 2021/06/30

 (9 件のコメント) (6 件のリアクション) (0 人の担当者)JavaScript (783 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (5,457 個のスター)
PR merge metrics
 (平均マージ 6d) (30d で 21 merged PRs)

説明

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.

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

コントリビューターガイド