fix(logger): Replace direct console logging with unified logger interface for consistent formatting

This commit is contained in:
2025-03-26 22:28:38 +00:00
parent 03056d279d
commit f3de3f0618
9 changed files with 157 additions and 106 deletions

View File

@ -53,16 +53,19 @@ tap.test('should handle width persistence between logbox calls', async () => {
tap.test('should throw error when using logBoxLine without width', async () => {
let errorThrown = false;
let errorMessage = '';
try {
// Should throw because no width is set
logger.logBoxLine('This should fail');
} catch (error) {
errorThrown = true;
expect((error as Error).message).toContain('No box width specified');
errorMessage = (error as Error).message;
}
expect(errorThrown).toBeTruthy();
expect(errorMessage).toBeTruthy();
expect(errorMessage.includes('No box width')).toBeTruthy();
});
tap.test('should create a complete logbox in one call', async () => {