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:
@@ -42,13 +42,24 @@ describe('BoundsControl', () => {
|
||||
});
|
||||
|
||||
it('errors on non-numeric', () => {
|
||||
wrapper.find(FormControl).first().simulate('change', { target: { value: 's' } });
|
||||
wrapper
|
||||
.find(FormControl)
|
||||
.first()
|
||||
.simulate('change', { target: { value: 's' } });
|
||||
expect(defaultProps.onChange.calledWith([null, null])).toBe(true);
|
||||
expect(defaultProps.onChange.getCall(0).args[1][0]).toContain('value should be numeric');
|
||||
expect(defaultProps.onChange.getCall(0).args[1][0]).toContain(
|
||||
'value should be numeric',
|
||||
);
|
||||
});
|
||||
it('casts to numeric', () => {
|
||||
wrapper.find(FormControl).first().simulate('change', { target: { value: '1' } });
|
||||
wrapper.find(FormControl).last().simulate('change', { target: { value: '5' } });
|
||||
wrapper
|
||||
.find(FormControl)
|
||||
.first()
|
||||
.simulate('change', { target: { value: '1' } });
|
||||
wrapper
|
||||
.find(FormControl)
|
||||
.last()
|
||||
.simulate('change', { target: { value: '5' } });
|
||||
expect(defaultProps.onChange.calledWith([1, 5])).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user