I met this TypeError: CSS.supports is not a function when writing a test file for my feature using Codeflask
I also try to bypass this by using global.CSS, but it does not seem to work on my side.
import React from 'react';
import { render, screen } from '@testing-library/react';
import { setupServer } from 'msw/node';
import { defaultConfigurationProps } from '@applets/ImportManager/__helper__/ConfigurationDialogWrapper';
import { setMockAuthToken } from '@util/testhelpers/init';
import NewColumnDialog from '.';
import { setDocumentHeight } from '../../../../../../../config/jest/jestHelpers';
import { AGGREGRATE, LOGICAL, MATHEMATICAL } from './MenuOption';
global.CSS = { supports: jest.fn(), escape: jest.fn() }; // Add this to bypass the CSS.supports is not a function
const server = setupServer();
beforeAll(() => {
setMockAuthToken();
server.listen();
});
...etc
Do you guys know any way to resolve or at least bypass this? Thanks.
I met this
TypeError: CSS.supports is not a function
when writing a test file for my feature using CodeflaskI also try to bypass this by using
global.CSS
, but it does not seem to work on my side.Do you guys know any way to resolve or at least bypass this? Thanks.
Version: