Skip to content

Implement timeout #1

@timursevimli

Description

@timursevimli

Need to implement a timeout to limit the maximum running time

Example:

const wrappedFn = await retry(
  () => new Promise((r) => void setTimeout(r, 1_500)),
  { count: 3, timeout: 1_000 },
)().catch((err) => {
  assert.strictEqual(err.message, 'Process timed out!');
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions