const table = [ ["one", 1], ["two", 2], ["three", 3], ]; test.each(table)("converts %s to %d", (str, expected) => { // Will be called 3 times with "one", "two", "three" const result = convertToNumber(str); expect(result).toBe(expected); });
Newsletter