fixed logger tests

This commit is contained in:
Bojan Kucera 2025-06-07 12:22:45 -04:00
parent d836e766d5
commit 38b523d2c0
4 changed files with 21 additions and 19 deletions

View file

@ -8,7 +8,8 @@ import { describe, it, expect, beforeEach, afterEach } from 'bun:test';
import {
Logger,
createLogger,
getLogger
getLogger,
shutdownLoggers
} from '../src';
import { loggerTestHelpers } from './setup';
@ -20,9 +21,10 @@ describe('Logger Integration Tests', () => {
testLoggerInstance = loggerTestHelpers.createTestLogger('integration-test');
logger = testLoggerInstance.logger;
});
afterEach(() => {
afterEach(async () => {
testLoggerInstance.clearCapturedLogs();
// Clear any global logger cache
await shutdownLoggers();
});
describe('Core Logger Functionality', () => {