describe('add', () => { it('should add two numbers', () => { expect(add(1, 2)).toEqual(3); }); });
export function add(left: number, right: number) { return left + right; }
time
cost
benefit
"I don't need tests, I know that my code works!"
"The requirements will change, and we will have to update the code and the tests!"
"I don't know how to test this code, it performs database queries and http requests!"
By bastoche