fixed logger tests
This commit is contained in:
parent
d836e766d5
commit
38b523d2c0
4 changed files with 21 additions and 19 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* Provides utilities and mocks for testing logging operations.
|
||||
*/
|
||||
|
||||
import { Logger, LogMetadata } from '../src';
|
||||
import { Logger, LogMetadata, shutdownLoggers } from '../src';
|
||||
import { afterAll, afterEach, beforeAll, beforeEach } from 'bun:test';
|
||||
|
||||
// Store original console methods
|
||||
|
|
@ -178,8 +178,9 @@ beforeAll(() => {
|
|||
});
|
||||
|
||||
// Clean up after each test
|
||||
afterEach(() => {
|
||||
// loggerTestHelpers.clearCapturedLogs(); // REMOVE this if it targeted a global array
|
||||
afterEach(async () => {
|
||||
// Clear logger cache to prevent state pollution between tests
|
||||
await shutdownLoggers();
|
||||
});
|
||||
|
||||
// Restore everything after tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue