From 04a698043153be784a2d881f56ff8b4a748802c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Wed, 17 May 2023 13:12:34 +0200 Subject: [PATCH] Fix tests under Node 18 --- packages/mui-material-next/src/Tabs/Tabs.test.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/mui-material-next/src/Tabs/Tabs.test.js b/packages/mui-material-next/src/Tabs/Tabs.test.js index 9d17ac411e1107..3c894e825c13e1 100644 --- a/packages/mui-material-next/src/Tabs/Tabs.test.js +++ b/packages/mui-material-next/src/Tabs/Tabs.test.js @@ -338,11 +338,21 @@ describe('', () => { 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', () => {