From d3d6fd2ebe311dac681589d4da8f777d336867b3 Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Tue, 27 Aug 2024 13:13:48 +0200 Subject: [PATCH] Remove (disable) isolate option because it sometimes doesn't show stories --- code/addons/vitest/src/postinstall.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index b17e982d3a3e..adb1acbf2081 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -133,16 +133,13 @@ export default async function postInstall(options: PostinstallOptions) { storybookTest(),${vitestInfo.frameworkPluginCall ? '\n' + vitestInfo.frameworkPluginCall : ''} ], test: { - include: ['**/*.stories.?(m)[jt]s?(x)'], browser: { enabled: true, + headless: true, name: 'chromium', provider: 'playwright', - headless: true, }, - // Disabling isolation is faster and is similar to how tests are isolated in Storybook itself. - // Consider removing this if you are seeing problems with your tests. - isolate: false, + include: ['**/*.stories.?(m)[jt]s?(x)'], setupFiles: ['./.storybook/vitest.setup.ts'], }, }, @@ -164,16 +161,13 @@ export default async function postInstall(options: PostinstallOptions) { storybookTest(),${vitestInfo.frameworkPluginCall ? '\n' + vitestInfo.frameworkPluginCall : ''} ], test: { - include: ['**/*.stories.?(m)[jt]s?(x)'], browser: { enabled: true, + headless: true, name: 'chromium', provider: 'playwright', - headless: true, }, - // Disabling isolation is faster and is similar to how tests are isolated in Storybook itself. - // Consider removing this, if you have flaky tests. - isolate: false, + include: ['**/*.stories.?(m)[jt]s?(x)'], setupFiles: ['./.storybook/vitest.setup.ts'], }, });