Fix metrics panel test by adding config mock

This commit is contained in:
David Kaltschmidt
2018-06-06 11:15:24 +02:00
parent 661503f828
commit 3bd58446d6

View File

@@ -1,8 +1,19 @@
jest.mock('app/core/core', () => ({}));
jest.mock('app/core/config', () => {
return {
exploreEnabled: true,
panels: {
test: {
id: 'test',
name: 'test',
},
},
};
});
import { MetricsPanelCtrl } from '../metrics_panel_ctrl';
import q from 'q';
import { PanelModel } from 'app/features/dashboard/panel_model';
import { MetricsPanelCtrl } from '../metrics_panel_ctrl';
describe('MetricsPanelCtrl', () => {
let ctrl;