diff --git a/docs/vitest.config.ts b/docs/vitest.config.ts index 5c2bc443ab..272c2a82b7 100644 --- a/docs/vitest.config.ts +++ b/docs/vitest.config.ts @@ -10,6 +10,9 @@ export default mergeConfig( enabled: false, name: 'node', }, + env: { + VITEST_ENV: 'node', + }, }, }), ); diff --git a/test/setupVitest.ts b/test/setupVitest.ts index e7c2ce531b..2e32d8614d 100644 --- a/test/setupVitest.ts +++ b/test/setupVitest.ts @@ -15,7 +15,7 @@ globalThis.after = afterAll; // @ts-ignore globalThis.vi = vi; -const isVitestJsdom = process.env.MUI_JSDOM === 'true'; +const isVitestJsdom = process.env.VITEST_ENV === 'jsdom'; // Only necessary when not in browser mode. if (isVitestJsdom) {