mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
41 lines
830 B
JavaScript
41 lines
830 B
JavaScript
define([
|
|
'helpers',
|
|
'features/panel/panelSrv',
|
|
], function() {
|
|
'use strict';
|
|
|
|
describe('PanelSrv', function() {
|
|
var _panelSrv;
|
|
var _panelScope;
|
|
var _datasourceSrvStub;
|
|
|
|
beforeEach(module('grafana.services'));
|
|
beforeEach(module(function($provide) {
|
|
_datasourceSrvStub = {
|
|
getMetricSources: sinon.spy(),
|
|
};
|
|
$provide.value('datasourceSrv', _datasourceSrvStub);
|
|
}));
|
|
|
|
beforeEach(inject(function(panelSrv, $rootScope) {
|
|
_panelSrv = panelSrv;
|
|
_panelScope = $rootScope.$new();
|
|
_panelScope.panel = {
|
|
targets: [],
|
|
};
|
|
_panelScope.dashboardViewState = {
|
|
registerPanel: sinon.spy(),
|
|
};
|
|
}));
|
|
|
|
describe('init', function() {
|
|
beforeEach(function() {
|
|
_panelSrv.init(_panelScope);
|
|
});
|
|
|
|
});
|
|
});
|
|
|
|
});
|
|
|