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

@@ -27,7 +27,10 @@ import VirtualizedRendererWrap from '../../../../src/components/VirtualizedRende
import SelectControl from '../../../../src/explore/components/controls/SelectControl';
const defaultProps = {
choices: [['1 year ago', '1 year ago'], ['today', 'today']],
choices: [
['1 year ago', '1 year ago'],
['today', 'today'],
],
name: 'row_limit',
label: 'Row Limit',
valueKey: 'value', // shallow isn't passing SelectControl.defaultProps.valueKey through
@@ -115,8 +118,11 @@ describe('SelectControl', () => {
valueKey: 'value',
};
wrapper.setProps(selectAllProps);
expect(wrapper.instance().getOptions(selectAllProps))
.toContainEqual({ label: 'Select All', meta: true, value: 'Select All' });
expect(wrapper.instance().getOptions(selectAllProps)).toContainEqual({
label: 'Select All',
meta: true,
value: 'Select All',
});
});
it('returns the correct options when freeform is set to true', () => {
@@ -145,7 +151,10 @@ describe('SelectControl', () => {
{ value: 'four', label: 'four' },
];
const newProps = {
choices: [['three', 'three'], ['four', 'four']],
choices: [
['three', 'three'],
['four', 'four'],
],
name: 'name',
freeForm: false,
value: null,