Files
puaros/packages/core/tests/fixtures/code-samples/sample.ts
imfozilbek 8b81e6030d test(core): add unit tests and test infrastructure
Add test structure:
- Unit tests for BaseEntity
- Unit tests for Guards utility
- Test fixtures with code samples
- Integration and unit test directories
2025-11-23 21:43:55 +05:00

16 lines
342 B
TypeScript

export function add(a: number, b: number): number {
return a + b;
}
export const multiply = (a: number, b: number): number => {
return a * b;
};
export class Calculator {
public divide(a: number, b: number): number {
if (b === 0) {
throw new Error('Division by zero');
}
return a / b;
}
}