mirror of
https://github.com/apache/superset.git
synced 2026-04-17 15:15:20 +00:00
chore: upgrade eslint, babel, and prettier (#12393)
This commit is contained in:
@@ -201,8 +201,8 @@ describe('SaveModal', () => {
|
||||
Object.defineProperty(window, 'location', windowLocation);
|
||||
});
|
||||
|
||||
it('Save & go to dashboard', () => {
|
||||
return new Promise(done => {
|
||||
it('Save & go to dashboard', () =>
|
||||
new Promise(done => {
|
||||
wrapper.instance().saveOrOverwrite(true);
|
||||
defaultProps.actions.saveSlice().then(() => {
|
||||
expect(window.location.assign.callCount).toEqual(1);
|
||||
@@ -211,11 +211,10 @@ describe('SaveModal', () => {
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
it('saveas new slice', () => {
|
||||
return new Promise(done => {
|
||||
it('saveas new slice', () =>
|
||||
new Promise(done => {
|
||||
wrapper.setState({
|
||||
action: 'saveas',
|
||||
newSliceName: 'new slice name',
|
||||
@@ -228,11 +227,10 @@ describe('SaveModal', () => {
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
it('overwrite original slice', () => {
|
||||
return new Promise(done => {
|
||||
it('overwrite original slice', () =>
|
||||
new Promise(done => {
|
||||
wrapper.setState({ action: 'overwrite' });
|
||||
wrapper.instance().saveOrOverwrite(false);
|
||||
defaultProps.actions.saveSlice().then(() => {
|
||||
@@ -242,8 +240,7 @@ describe('SaveModal', () => {
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ const defaultProps = {
|
||||
|
||||
function verify(sourceProp: string) {
|
||||
const mock = jest.fn();
|
||||
mock.mockImplementation(async (props: ControlPropsWithExtras) => {
|
||||
return { [sourceProp]: props.validMetrics || [VALID_METRIC] };
|
||||
});
|
||||
mock.mockImplementation(async (props: ControlPropsWithExtras) => ({
|
||||
[sourceProp]: props.validMetrics || [VALID_METRIC],
|
||||
}));
|
||||
return mock;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user