import expect, { spyOn, restoreSpies } from 'expect';
// To test backward compatibility
import * as Logstar from './';

describe('index', () => {
  afterEach(() => {
    restoreSpies();
  });

  it('transaction logger', () => {
    const trans = Logstar.transactionLogger('ASDF-1234');
    spyOn(trans.winston, 'log').andReturn(true);

    trans.info('foo');
    expect(trans.winston.log).toHaveBeenCalledWith('info', 'foo', {
      transaction_id: 'ASDF-1234',
    });
  });

  it('exported logging methods', () => {
    spyOn(Logstar.default.winston.transports.console, 'log').andReturn(true);
    Logstar.info('testing');
    expect(Logstar.default.winston.transports.console.log).toHaveBeenCalled();
  });
});

@@ -472,18 +472,24 @@
  %7D);%0A%0A  
-it
+describe
 ('export
@@ -513,24 +513,49 @@
 s', () =%3E %7B%0A
+    beforeEach(() =%3E %7B%0A  
     spyOn(Lo
@@ -628,20 +628,327 @@
     
-Logstar.info
+%7D);%0A%0A    it('should not call debug since default is info', () =%3E %7B%0A      Logstar.debug('testing');%0A      expect(Logstar.default.winston.transports.console.log).toNotHaveBeenCalled();%0A    %7D);%0A%0A    %5B'info', 'warn', 'error'%5D.forEach(method =%3E %7B%0A      it(%60should work with method $%7Bmethod%7D%60, () =%3E %7B%0A        Logstar%5Bmethod%5D
 ('te
@@ -952,24 +952,28 @@
 'testing');%0A
+    
     expect(L
@@ -1035,22 +1035,40 @@
 enCalled();%0A
+      %7D);%0A    %7D);%0A
   %7D);%0A%7D);%0A

Fix tests per review