Skip to content

delay/sleeps/timeouts helper #3267

Open
@mfulton26

Description

@mfulton26

Clear and concise description of the problem

A convenient helper for add random delays/sleeps/timeouts (e.g. to simulate non-deterministic network loads).

Suggested solution

await faker.helpers.timeout({ min: 400, max: 1000 });

Alternative

Pull in and use delay or roll it myself:

await new Promise((resolve) => setTimeout(resolve, faker.number.int({ min: 400, max: 1000 })));

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions