Complete worked example
typescript
import { test, expect } from "../support/test.js";
import { roles, selectRoles, validInteger } from "../support/domain.mjs";
for (const [value, valid] of [[0,false],[1,true],[2,true],[3,true],[4,false]] as const) {
test(`limit ${value} is ${valid}`, () => {
expect(validInteger(value)).toBe(valid);
});
}- Reasoning
- Literal expected booleans keep the table independent and failures specific.