@@ -26,23 +26,23 @@ describe('Logging', () => {
2626 } ) ;
2727 } ) ;
2828
29- describe ( "when the logLevel configuration is set to 'ERROR '" , ( ) => {
29+ describe ( "when the logLevel configuration is set to 'WARN '" , ( ) => {
3030 it ( 'logs a warning to the console' , ( ) => {
31- config . set ( 'logLevel' , 'ERROR ' ) ;
31+ config . set ( 'logLevel' , 'WARN ' ) ;
3232
3333 printIonWarning ( 'This is a warning message' ) ;
3434
3535 expect ( consoleWarnSpy ) . toHaveBeenCalledWith ( '[Ionic Warn]: This is a warning message' ) ;
3636 } ) ;
3737 } ) ;
3838
39- describe ( "when the logLevel configuration is set to 'WARN '" , ( ) => {
40- it ( 'logs a warning to the console' , ( ) => {
41- config . set ( 'logLevel' , 'WARN ' ) ;
39+ describe ( "when the logLevel configuration is set to 'ERROR '" , ( ) => {
40+ it ( 'does not log a warning to the console' , ( ) => {
41+ config . set ( 'logLevel' , 'ERROR ' ) ;
4242
4343 printIonWarning ( 'This is a warning message' ) ;
4444
45- expect ( consoleWarnSpy ) . toHaveBeenCalledWith ( '[Ionic Warn]: This is a warning message' ) ;
45+ expect ( consoleWarnSpy ) . not . toHaveBeenCalled ( ) ;
4646 } ) ;
4747 } ) ;
4848
@@ -91,12 +91,12 @@ describe('Logging', () => {
9191 } ) ;
9292
9393 describe ( "when the logLevel configuration is set to 'WARN'" , ( ) => {
94- it ( 'does not log an error to the console' , ( ) => {
94+ it ( 'logs an error to the console' , ( ) => {
9595 config . set ( 'logLevel' , 'WARN' ) ;
9696
9797 printIonError ( 'This is an error message' ) ;
9898
99- expect ( consoleErrorSpy ) . not . toHaveBeenCalled ( ) ;
99+ expect ( consoleErrorSpy ) . toHaveBeenCalledWith ( '[Ionic Error]: This is an error message' ) ;
100100 } ) ;
101101 } ) ;
102102
0 commit comments