import initPanels from '../init_panels';
import { expect } from 'chai';
import sinon from 'sinon';
const { describe, it } = global;

describe('manager.ui.config.init_panels', () => {
  it('should call the selectDownPanel with first panel name', () => {
    const actions = {
      ui: {
        selectDownPanel: sinon.mock()
      }
    };

    const provider = {
      getPanels() {
        return {
          test1: {},
          test2: {},
          test3: {}
        };
      }
    };

    initPanels({ provider }, actions);

    /* eslint-disable no-unused-expressions */
    expect(actions.ui.selectDownPanel.calledWith('test1')).to.be.true;
    /* eslint-enable no-unused-expressions */
  });
});

@@ -37,99 +37,8 @@
 ls';
-%0Aimport %7B expect %7D from 'chai';%0Aimport sinon from 'sinon';%0Aconst %7B describe, it %7D = global;
 %0A%0Ade
@@ -87,17 +87,19 @@
  =%3E %7B%0A  
-i
+tes
 t('shoul
@@ -220,18 +220,15 @@
 el: 
-sinon.mock
+jest.fn
 ()%0A 
@@ -435,55 +435,8 @@
 );%0A%0A
-    /* eslint-disable no-unused-expressions */%0A
     
@@ -468,18 +468,29 @@
 ownPanel
-.c
+).toHaveBeenC
 alledWit
@@ -503,67 +503,9 @@
 t1')
-).to.be.true;%0A    /* eslint-enable no-unused-expressions */
+;
 %0A  %7D

use Jest mocks in init_panels