mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
fix: update logger tests to use console.log instead of console.warn
- Modified logger test cases to reflect that the warn method uses console.log in Node.js implementation. - Updated expectations in feature-loader tests to align with the new logging behavior. - Ensured consistent logging behavior across tests for improved clarity and accuracy.
This commit is contained in:
@@ -78,11 +78,12 @@ describe('logger.ts', () => {
|
||||
|
||||
setLogLevel(LogLevel.ERROR);
|
||||
logger.warn('warn message 1');
|
||||
expect(consoleSpy.warn).not.toHaveBeenCalled();
|
||||
expect(consoleSpy.log).not.toHaveBeenCalled();
|
||||
|
||||
setLogLevel(LogLevel.WARN);
|
||||
logger.warn('warn message 2');
|
||||
expect(consoleSpy.warn).toHaveBeenCalledWith('WARN [Test]', 'warn message 2');
|
||||
// Note: warn uses console.log in Node.js implementation
|
||||
expect(consoleSpy.log).toHaveBeenCalledWith('WARN [Test]', 'warn message 2');
|
||||
});
|
||||
|
||||
it('should log info when level is INFO or higher', () => {
|
||||
|
||||
Reference in New Issue
Block a user