mirror of
https://github.com/FJurmanovic/sugarr.git
synced 2026-11-11 07:41:08 +00:00
Scaffold TypeScript project and add core logger
This commit is contained in:
11
test/core/logging/logger.test.ts
Normal file
11
test/core/logging/logger.test.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { createLogger } from '../../../src/core/logging/logger';
|
||||
|
||||
describe('createLogger', () => {
|
||||
it('creates a pino logger with the given name bound', () => {
|
||||
const logger = createLogger('test-logger');
|
||||
expect(logger.bindings().name).toBe('test-logger');
|
||||
expect(typeof logger.info).toBe('function');
|
||||
expect(typeof logger.error).toBe('function');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user