mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:23:10 +08:00
Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members Changes lodash imports of the form `import x from 'lodash/x'` to `import { x } from 'lodash'` to reduce bundle size. * Remove unnecessary _ import from Graph component * Enforce lodash import style * Fix remaining lodash imports
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
import { rangeUtil, dateTime } from '@grafana/data';
|
||||
import _ from 'lodash';
|
||||
import { keys } from 'lodash';
|
||||
|
||||
describe('rangeUtil', () => {
|
||||
describe('Can get range grouped list of ranges', () => {
|
||||
it('when custom settings should return default range list', () => {
|
||||
const groups: any = rangeUtil.getRelativeTimesList({ time_options: [] }, 'Last 5 minutes');
|
||||
expect(_.keys(groups).length).toBe(4);
|
||||
expect(keys(groups).length).toBe(4);
|
||||
expect(groups[3][0].active).toBe(true);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user