mirror of
https://github.com/apache/superset.git
synced 2026-04-10 20:06:13 +00:00
Prettify the frontend code (#8648)
* Add Prettier global configs * Format js/jsx/ts/tsx/less files
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user