Commit 49a8c2e0 by Tobias Skarhed

Make beautiful

parent c0f9c06f
...@@ -12,18 +12,19 @@ describe('Prometheus editor completer', function() { ...@@ -12,18 +12,19 @@ describe('Prometheus editor completer', function() {
function getSessionStub(data) { function getSessionStub(data) {
return { return {
getTokenAt:jest.fn(()=> (data.currentToken)), getTokenAt: jest.fn(() => data.currentToken),
getTokens:jest.fn(()=> (data.tokens)), getTokens: jest.fn(() => data.tokens),
getLine:jest.fn(()=> (data.line)), getLine: jest.fn(() => data.line),
}; };
} }
let editor = {}; let editor = {};
let backendSrv = <BackendSrv>{} let backendSrv = <BackendSrv>{};
let datasourceStub = new PrometheusDatasource({},{},backendSrv,{},{}); let datasourceStub = new PrometheusDatasource({}, {}, backendSrv, {}, {});
datasourceStub.performInstantQuery = jest.fn(() => Promise.resolve({ datasourceStub.performInstantQuery = jest.fn(() =>
Promise.resolve({
data: { data: {
data: { data: {
result: [ result: [
...@@ -40,7 +41,6 @@ describe('Prometheus editor completer', function() { ...@@ -40,7 +41,6 @@ describe('Prometheus editor completer', function() {
); );
datasourceStub.performSuggestQuery = jest.fn(() => Promise.resolve(['node_cpu'])); datasourceStub.performSuggestQuery = jest.fn(() => Promise.resolve(['node_cpu']));
let templateSrv = { let templateSrv = {
variables: [ variables: [
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment