Ende.TestEach

interface

interface Ende.TestEach

Register a parameterized group of tests. See EndeTest.each.

The first overload handles array cases (their values are spread as positional arguments); the second handles object or primitive cases (each passed as a single argument followed by the TestContext).

The TestContext is also passed as the final argument to array case functions at runtime, but is not reflected in their parameter types so that the case values stay correctly typed.

Call signatures

Call signature

<T extends readonly unknown[]>(cases: readonly T[]): { (name: string, fn: (...args: [...T]) => void | Promise<void>): void; (name: string, options: Omit<TestDefinition, "fn" | "name">, fn: (...args: [...T]) => void | Promise<void>): void }
<T>(cases: readonly T[]): { (name: string, fn: (value: T, t: TestContext) => void | Promise<void>): void; (name: string, options: Omit<TestDefinition, "fn" | "name">, fn: (value: T, t: TestContext) => void | Promise<void>): void }