rusackas commented on code in PR #42157:
URL: https://github.com/apache/superset/pull/42157#discussion_r3642289861
##########
superset-frontend/src/components/Chart/chartActions.test.ts:
##########
@@ -463,6 +463,113 @@ describe('chart actions', () => {
expect(addWarningToastSpy).not.toHaveBeenCalled();
addWarningToastSpy.mockRestore();
});
+
+ // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from
describe blocks
+ describe('GlobalAsyncQueries error handling', () => {
+ beforeEach(() => {
+ (
+ global as unknown as { featureFlags: Record<string, boolean> }
+ ).featureFlags = {
+ [FeatureFlag.GlobalAsyncQueries]: true,
+ };
+ });
Review Comment:
I think Codeant is a false positive here. The outer `describe`'s `afterEach`
resets `global.featureFlags` after every test, so the flag doesn't leak into
the later blocks. Resolving!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]