Skip to content

Commit

Permalink
Fix tests under Node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed May 17, 2023
1 parent 91c7b85 commit 04a6980
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/mui-material-next/src/Tabs/Tabs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,21 @@ describe('<Tabs />', () => {

nodeEnv = process.env.NODE_ENV;
// We can't use a regular assignment, because it causes a syntax error in Karma
Object.defineProperty(process.env, 'NODE_ENV', { value: 'development' });
Object.defineProperty(process.env, 'NODE_ENV', {
value: 'development',
configurable: true,
writable: true,
enumerable: true,
});
});

after(() => {
Object.defineProperty(process.env, 'NODE_ENV', { value: nodeEnv });
Object.defineProperty(process.env, 'NODE_ENV', {
value: nodeEnv,
configurable: true,
writable: true,
enumerable: true,
});
});

it('should warn if a Tab has display: none', () => {
Expand Down

0 comments on commit 04a6980

Please sign in to comment.