method

test.Test.for

for<Row>(
table: readonly Row[]
): TestWithContext<object, [row: Row]>;

Like each(), but an array row is passed as one argument instead of being spread, and the second argument is the TestContext.

test.for([[1, 2, 3]])("%i + %i = %i", ([a, b, sum], { expect }) => {
  expect(a + b).toBe(sum);
});
headings: TemplateStringsArray,
...values: any[]
): TestWithContext<object, [row: any]>;

Referenced types

interface TestWithContext<Context, Row extends ReadonlyArray<unknown> = []>

A test whose callbacks receive the TestContext instead of a done callback.