Skip to content

Commit

Permalink
Use React 18 adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
m4theushw committed Jul 22, 2022
1 parent 541a122 commit 139ace0
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions test/utils/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,8 @@ import './licenseRelease';
import './licenseKey';
import { unstable_resetCleanupTracking } from '@mui/x-data-grid';
import { unstable_resetCleanupTracking as unstable_resetCleanupTrackingPro } from '@mui/x-data-grid-pro';
import enzyme from 'enzyme';
import Adapter from '@eps1lon/enzyme-adapter-react-17';
import * as testingLibrary from '@testing-library/react/pure';
import '@mui/monorepo/test/utils/initMatchers';

enzyme.configure({ adapter: new Adapter() });

// checking if an element is hidden is quite expensive
// this is only done in CI as a fail safe. It can still explicitly be checked
// in the test files which helps documenting what is part of the DOM but hidden
// from assistive technology
const defaultHidden = !process.env.CI;
// adds verbosity for something that might be confusing
console.warn(`${defaultHidden ? 'including' : 'excluding'} inaccessible elements by default`);
testingLibrary.configure({ defaultHidden });
export * from '@mui/monorepo/test/utils/init';

const mochaHooks = {
beforeEach: [],
Expand Down

0 comments on commit 139ace0

Please sign in to comment.