fixed logger tests

This commit is contained in:
Bojan Kucera 2025-06-07 11:04:35 -04:00
parent e76489e8f3
commit 6b4d4ea29f
3 changed files with 23 additions and 13 deletions

View file

@ -4,7 +4,7 @@
* Tests the core functionality of the simplified @stock-bot/logger package.
*/
import { describe, it, expect, beforeEach } from 'bun:test';
import { describe, it, expect, beforeEach, afterEach } from 'bun:test';
import {
Logger,
createLogger,
@ -17,7 +17,11 @@ describe('Logger Integration Tests', () => {
beforeEach(() => {
// Create a new test logger before each test
loggerTestHelpers.clearCapturedLogs();
logger = loggerTestHelpers.createTestLogger('integration-test');
});
afterEach(() => {
loggerTestHelpers.clearCapturedLogs();
});