You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this._log(LogLevels.ERROR,'Invalid `logger` instance. It must be an object with `debug`, `info`, `warn` and `error` methods. Defaulting to `console.log`');
expect(consoleLogSpy).toBeCalledWith('[ERROR] splitio => Invalid `logger` instance. It must be an object with `debug`, `info`, `warn` and `error` methods. Defaulting to `console.log`');
90
+
91
+
logger.debug('test debug');
92
+
expect(consoleLogSpy).toBeCalledWith('[DEBUG] splitio => test debug');
93
+
94
+
logger.info('test info');
95
+
expect(consoleLogSpy).toBeCalledWith('[INFO] splitio => test info');
96
+
97
+
logger.warn('test warn');
98
+
expect(consoleLogSpy).toBeCalledWith('[WARN] splitio => test warn');
99
+
100
+
logger.error('test error');
101
+
expect(consoleLogSpy).toBeCalledWith('[ERROR] splitio => test error');
102
+
103
+
expect(consoleLogSpy).toBeCalledTimes(5);
104
+
});
105
+
106
+
test.each(testTargets)('uses the default console.log method if the provided custom logger throws an error',(validateLogger)=>{
0 commit comments