describe() is used to group related tests together. It creates a test suite and helps organize tests logically:
describe('Calculator', () => {
test('should add two numbers', () => {
expect(add(2, 3)).toBe(5);
});
test('should subtract two numbers', () => {
expect(subtract(5, 3)).toBe(2);
});
});
Benefits of using describe():