Skip to content

Commit

Permalink
fix: warning message format
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-perkins committed Nov 13, 2024
1 parent f05ecc3 commit d101f2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/utils/logging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { config } from '@global/config';
export const printIonWarning = (message: string, ...params: any[]) => {
const logLevel = config.get('logLevel', 'WARN');
if (['WARN'].includes(logLevel)) {
return console.warn(`[Ionic Warn]: ${message}`, ...params);
return console.warn(`[Ionic Warning]: ${message}`, ...params);
}
};

Expand Down
4 changes: 2 additions & 2 deletions core/src/utils/logging/test/logging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Logging', () => {

printIonWarning('This is a warning message');

expect(consoleWarnSpy).toHaveBeenCalledWith('[Ionic Warn]: This is a warning message');
expect(consoleWarnSpy).toHaveBeenCalledWith('[Ionic Warning]: This is a warning message');
});
});

Expand All @@ -32,7 +32,7 @@ describe('Logging', () => {

printIonWarning('This is a warning message');

expect(consoleWarnSpy).toHaveBeenCalledWith('[Ionic Warn]: This is a warning message');
expect(consoleWarnSpy).toHaveBeenCalledWith('[Ionic Warning]: This is a warning message');
});
});

Expand Down

0 comments on commit d101f2e

Please sign in to comment.