dequelabs/axe-core

axe-core timeout with mock timer in JS unit tests

Aberta

#3.055 aberto em 30 de jun. de 2021

 (9 comentários) (6 reações) (0 responsável)JavaScript (783 forks)batch import
help wanted

Métricas do repositório

Stars
 (5.457 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d) (21 fundiu PRs em 30d)

Description

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 ?

Guia do colaborador