Prettify the frontend code (#8648)

* Add Prettier global configs

* Format js/jsx/ts/tsx/less files
This commit is contained in:
Erik Ritter
2019-11-27 14:02:48 -08:00
committed by GitHub
parent e21f768a92
commit 44d919c757
398 changed files with 8700 additions and 6117 deletions

View File

@@ -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');
});
});