Skip to content

Commit b74db1e

Browse files
author
naman-contentstack
committed
updated test cases
1 parent 8e9bb52 commit b74db1e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/contentstack-audit/test/unit/base-command.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('BaseCommand class', () => {
1919
} as FileTransportInstance;
2020

2121
const createMockWinstonLogger = () => ({
22-
log: (message: string) => console.log(message),
23-
error: (message: string) => console.error(`ERROR: ${message}`),
24-
info: (message: string) => console.info(`INFO: ${message}`),
25-
warn: (message: string) => console.warn(`WARN: ${message}`),
26-
debug: (message: string) => console.debug(`DEBUG: ${message}`),
22+
log: (message: any) => process.stdout.write(typeof message === 'string' ? message : JSON.stringify(message) + '\n'),
23+
error: (message: any) => process.stdout.write(`ERROR: ${typeof message === 'string' ? message : JSON.stringify(message)}\n`),
24+
info: (message: any) => process.stdout.write(`INFO: ${typeof message === 'string' ? message : JSON.stringify(message)}\n`),
25+
warn: (message: any) => process.stdout.write(`WARN: ${typeof message === 'string' ? message : JSON.stringify(message)}\n`),
26+
debug: (message: any) => process.stdout.write(`DEBUG: ${typeof message === 'string' ? message : JSON.stringify(message)}\n`),
2727
level: 'info'
2828
});
2929

0 commit comments

Comments
 (0)