Skip to content

Make maxLoops for fake timers configurable #8257

@mxmzb

Description

@mxmzb

🚀 Feature Proposal

I'd like to be able to configure maxLoops (see https://github.com/facebook/jest/blob/master/packages/jest-fake-timers/src/jestFakeTimers.ts#L88) myself when using jest.useFakeTimers()

Motivation

I am writing a timer app, which actually may count to more than 100.000ms and it would still make sense. Unable to test this though to this limitation.

Pitch

The line already expects an argument which seems to be able to come from somewhere, but the API isn't making this really publically accessible. I don't see a reason why this should not be an optional param in jest.useFakeTimers().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions