Untitled
unknown
plain_text
9 months ago
515 B
14
Indexable
describe('Math Utility Tests', () => {
test('adds two positive numbers', () => {
expect(2 + 3).toBe(5);
});
test('subtracts two numbers', () => {
expect(10 - 4).toBe(6);
});
test('multiplies two numbers', () => {
expect(3 * 4).toBe(12);
});
test('divides two numbers', () => {
expect(12 / 4).toBe(3);
});
test('modulo operation', () => {
expect(10 % 3).toBe(1);
});
test('handles floating point precision', () => {
expect(0.1 + 0.2).toBeCloseTo(0.3, 5);
});
});
Editor is loading...
Leave a Comment