import { Calculator } from '../Calculator';

test('Calculator', () => {
  const { log } = global.console;

  // Setup
  const mockLog = jest.fn();
  const instance = new Calculator({
    debug: true,
    testing: true
  });

  // Mock
  global.console.log = mockLog;

  // Trigger
  instance.logger('Testing');
  expect(mockLog).toHaveBeenCalledWith('Testing');

  // Reset
  global.console.log = log;
});
