Writing Unit Tests with Jest
What testing technique is demonstrated here?
test.each([
[1, 1, 2],
[2, 2, 4],
[3, 3, 6]
])('adds %i + %i to equal %i', (a, b, expected) => {
expect(sum(a, b)).toBe(expected);
});
test.each([
[1, 1, 2],
[2, 2, 4],
[3, 3, 6]
])('adds %i + %i to equal %i', (a, b, expected) => {
expect(sum(a, b)).toBe(expected);
});