mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Prettify the frontend code (#8648)
* Add Prettier global configs * Format js/jsx/ts/tsx/less files
This commit is contained in:
@@ -44,24 +44,15 @@ describe('utils', () => {
|
||||
expect(mainMetric(null)).toBeUndefined();
|
||||
});
|
||||
it('prefers the "count" metric when first', () => {
|
||||
const metrics = [
|
||||
{ metric_name: 'count' },
|
||||
{ metric_name: 'foo' },
|
||||
];
|
||||
const metrics = [{ metric_name: 'count' }, { metric_name: 'foo' }];
|
||||
expect(mainMetric(metrics)).toBe('count');
|
||||
});
|
||||
it('prefers the "count" metric when not first', () => {
|
||||
const metrics = [
|
||||
{ metric_name: 'foo' },
|
||||
{ metric_name: 'count' },
|
||||
];
|
||||
const metrics = [{ metric_name: 'foo' }, { metric_name: 'count' }];
|
||||
expect(mainMetric(metrics)).toBe('count');
|
||||
});
|
||||
it('selects the first metric when "count" is not an option', () => {
|
||||
const metrics = [
|
||||
{ metric_name: 'foo' },
|
||||
{ metric_name: 'not_count' },
|
||||
];
|
||||
const metrics = [{ metric_name: 'foo' }, { metric_name: 'not_count' }];
|
||||
expect(mainMetric(metrics)).toBe('foo');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user