method Assert.prototype.timeout
Assert.prototype.timeout(number: number): void

Sets the number of milliseconds after which the current test will fail if not yet complete. Overrides the default from config.testTimeout (3000) for this test; 0 requires the test to finish synchronously.

Examples

Example 1

test("slow async operation", async (assert) => {
  assert.timeout(500);
  await somethingAsync();
  assert.ok(true);
});

Parameters

number: number

Timeout in milliseconds (non-negative integer).

Return Type

void

Usage

import { Assert } from ".";