Tests: Adds throwUnhandledRejections to jest setup (#19398)

* Chore: Adds throwUnhandledRejections to jest setup

* Bring back @grafana/runtime import

* Fix broken metric metadata aggregation test
This commit is contained in:
Hugo Häggmark
2019-09-25 05:10:11 -07:00
committed by GitHub
parent 97beb26f0c
commit 0598d60234
5 changed files with 32 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ import './editor/editor_component';
import kbn from 'app/core/utils/kbn';
import { TemplateSrv } from 'app/features/templating/template_srv';
import { auto } from 'angular';
import { auto, IPromise } from 'angular';
import { DataFrame } from '@grafana/data';
export interface ResultFormat {
@@ -396,9 +396,9 @@ export class AzureMonitorQueryCtrl extends QueryCtrl {
this.target.azureMonitor.dimension = '';
}
onMetricNameChange() {
onMetricNameChange(): IPromise<void> {
if (!this.target.azureMonitor.metricName || this.target.azureMonitor.metricName === this.defaultDropdownValue) {
return;
return Promise.resolve();
}
return this.datasource