11import { config } from '@global/config' ;
2+ import { LogLevel } from '../index' ;
23
34import { printIonError , printIonWarning } from '../index' ;
45
@@ -28,7 +29,7 @@ describe('Logging', () => {
2829
2930 describe ( "when the logLevel configuration is set to 'WARN'" , ( ) => {
3031 it ( 'logs a warning to the console' , ( ) => {
31- config . set ( 'logLevel' , ' WARN' ) ;
32+ config . set ( 'logLevel' , LogLevel . WARN ) ;
3233
3334 printIonWarning ( 'This is a warning message' ) ;
3435
@@ -38,7 +39,7 @@ describe('Logging', () => {
3839
3940 describe ( "when the logLevel configuration is set to 'ERROR'" , ( ) => {
4041 it ( 'does not log a warning to the console' , ( ) => {
41- config . set ( 'logLevel' , ' ERROR' ) ;
42+ config . set ( 'logLevel' , LogLevel . ERROR ) ;
4243
4344 printIonWarning ( 'This is a warning message' ) ;
4445
@@ -48,7 +49,7 @@ describe('Logging', () => {
4849
4950 describe ( "when the logLevel configuration is set to 'OFF'" , ( ) => {
5051 it ( 'does not log a warning to the console' , ( ) => {
51- config . set ( 'logLevel' , ' OFF' ) ;
52+ config . set ( 'logLevel' , LogLevel . OFF ) ;
5253
5354 printIonWarning ( 'This is a warning message' ) ;
5455
@@ -82,7 +83,7 @@ describe('Logging', () => {
8283
8384 describe ( "when the logLevel configuration is set to 'ERROR'" , ( ) => {
8485 it ( 'logs an error to the console' , ( ) => {
85- config . set ( 'logLevel' , ' ERROR' ) ;
86+ config . set ( 'logLevel' , LogLevel . ERROR ) ;
8687
8788 printIonError ( 'This is an error message' ) ;
8889
@@ -92,7 +93,7 @@ describe('Logging', () => {
9293
9394 describe ( "when the logLevel configuration is set to 'WARN'" , ( ) => {
9495 it ( 'logs an error to the console' , ( ) => {
95- config . set ( 'logLevel' , ' WARN' ) ;
96+ config . set ( 'logLevel' , LogLevel . WARN ) ;
9697
9798 printIonError ( 'This is an error message' ) ;
9899
@@ -102,7 +103,7 @@ describe('Logging', () => {
102103
103104 describe ( "when the logLevel configuration is set to 'OFF'" , ( ) => {
104105 it ( 'does not log an error to the console' , ( ) => {
105- config . set ( 'logLevel' , ' OFF' ) ;
106+ config . set ( 'logLevel' , LogLevel . OFF ) ;
106107
107108 printIonError ( 'This is an error message' ) ;
108109
0 commit comments