Fix tests errors and warnings - iteration 2 (#12212) (#12214)

This commit is contained in:
Michael S. Molina
2021-01-25 17:03:16 -03:00
committed by GitHub
parent 8c29ba88a4
commit 3fb183349f
12 changed files with 87 additions and 57 deletions

View File

@@ -131,7 +131,6 @@ describe('MetricsControl', () => {
label: 'SUM(value)',
optionName: 'blahblahblah',
},
'avg__value',
],
});
@@ -149,7 +148,6 @@ describe('MetricsControl', () => {
sqlExpression: null,
isNew: false,
},
'avg__value',
]);
});
});
@@ -157,7 +155,10 @@ describe('MetricsControl', () => {
describe('onChange', () => {
it('handles creating a new metric', () => {
const { component, onChange } = setup();
component.instance().onNewMetric({ metric_name: 'sum__value' });
component.instance().onNewMetric({
metric_name: 'sum__value',
expression: 'SUM(energy_usage.value)',
});
expect(onChange.lastCall.args).toEqual([['sum__value']]);
});
});