check args for query

This commit is contained in:
Mitsuhiro Tanda
2017-09-13 16:34:28 +09:00
parent 6bf8144793
commit 5bdd554671
@@ -18,7 +18,7 @@ describe('Prometheus editor completer', function() {
let editor = { session: session };
let datasourceStub = <PrometheusDatasource>{
performInstantQuery: sinon.stub().returns(Promise.resolve(
performInstantQuery: sinon.stub().withArgs({ expr: '{__name__="node_cpu"' }).returns(Promise.resolve(
[
{
metric: {
@@ -28,7 +28,7 @@ describe('Prometheus editor completer', function() {
}
]
)),
performSuggestQuery: sinon.stub().returns(Promise.resolve(
performSuggestQuery: sinon.stub().withArgs('node', true).returns(Promise.resolve(
[
'node_cpu'
]