Writing Unit Tests with Jest
What aspect of error handling testing is shown here?
test('validates user input', () => {
expect(() => {
validateUser({ name: '' });
}).toThrow('Name is required');
});
test('validates user input', () => {
expect(() => {
validateUser({ name: '' });
}).toThrow('Name is required');
});