Skip to content

Jest test setup #273

Discussion options

You must be logged in to vote

Hey @AndrianStoikov,

Have you checked out https://idletimer.dev/docs/getting-started/testing?

Basically you just need to call createMocks() in your test setup. That's going to essentially override the web worker timers with native timers for your tests.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@SupremeTechnopriest
Comment options

@AndrianStoikov
Comment options

@SupremeTechnopriest
Comment options

@AndrianStoikov
Comment options

@SupremeTechnopriest
Comment options

Answer selected by AndrianStoikov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants