import logger from '../logger';
describe('logger', function () {
  var consoleLogSpy;
  var consoleWarnSpy;
  var consoleErrorSpy;
  describe('debug', function () {
    it('invokes `console.log` with the correct message', function () {
      consoleLogSpy = jest.spyOn(global.console, 'log');
      logger.debug('Hello, World!');
      expect(consoleLogSpy).toHaveBeenCalledTimes(1);
      expect(consoleLogSpy).toHaveBeenCalledWith('DEBUG - MODDS - Hello, World!');
    });
  });
  describe('warn', function () {
    it('invokes `console.warn` with the correct message', function () {
      consoleWarnSpy = jest.spyOn(global.console, 'warn');
      logger.warn('Hello, World!');
      expect(consoleWarnSpy).toHaveBeenCalledTimes(1);
      expect(consoleWarnSpy).toHaveBeenCalledWith('WARN - MODDS - Hello, World!');
    });
  });
  describe('error', function () {
    it('invokes `console.error` with the correct message', function () {
      consoleErrorSpy = jest.spyOn(global.console, 'error');
      logger.error('Hello, World!');
      expect(consoleErrorSpy).toHaveBeenCalledTimes(1);
      expect(consoleErrorSpy).toHaveBeenCalledWith('ERROR - MODDS - Hello, World!');
    });
  });
});