more unit test work
This commit is contained in:
@@ -6,6 +6,7 @@ define([
|
||||
describe('OverviewCtrl', function() {
|
||||
var _controller;
|
||||
var _scope;
|
||||
var _datasource;
|
||||
|
||||
beforeEach(module('grafana.services'));
|
||||
beforeEach(module('grafana.panels.overview'));
|
||||
@@ -15,14 +16,22 @@ define([
|
||||
getMetricSources: function() {
|
||||
},
|
||||
get: function() {
|
||||
return {};
|
||||
return _datasource;
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
beforeEach(inject(function($controller, $rootScope) {
|
||||
beforeEach(inject(function($controller, $rootScope, $q) {
|
||||
_scope = $rootScope.$new();
|
||||
_scope.panel = { targets: [] };
|
||||
_scope.filter = {
|
||||
timeRange: function() { }
|
||||
};
|
||||
_scope.datasource = {
|
||||
query: function() {
|
||||
return $q.resolve('hej');
|
||||
}
|
||||
};
|
||||
_controller = $controller('OverviewCtrl', {
|
||||
$scope: _scope
|
||||
});
|
||||
|
||||
@@ -124,6 +124,7 @@ require([
|
||||
'specs/filterSrv-specs',
|
||||
'specs/kbn-format-specs',
|
||||
'specs/dashboardModel-specs',
|
||||
'specs/overview-ctrl-specs',
|
||||
'specs/influxSeries-specs'
|
||||
], function () {
|
||||
window.__karma__.start();
|
||||
|
||||
Reference in New Issue
Block a user