From d812d4dd7f2b4b96a46ac2ae69d7fd75e135ba62 Mon Sep 17 00:00:00 2001 From: Vitor Augusto Pinheiro <26413854+Vitorgus@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:13:01 -0300 Subject: [PATCH] renamed vitest addon import file name to 'test' --- scripts/tasks/sandbox-parts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 10a61d8dcec6..971bcb7e27c3 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -207,7 +207,7 @@ function addEsbuildLoaderToStories(mainConfig: ConfigFile) { }, }, // Handle MDX files per the addon-docs presets (ish) - { + { test: /template-stories\\/.*\\.mdx$/, exclude: /\\.stories\\.mdx$/, use: [ @@ -512,7 +512,7 @@ export async function setupVitest(details: TemplateDetails, options: PassedOptio // This workaround is needed because Vitest seems to have issues in link mode // so the /setup-file and /global-setup files from the vitest addon won't work in portal protocol if (options.link) { - const vitestAddonPath = relative(sandboxDir, join(CODE_DIRECTORY, 'addons', 'vitest')); + const vitestAddonPath = relative(sandboxDir, join(CODE_DIRECTORY, 'addons', 'test')); packageJson.resolutions = { ...packageJson.resolutions, '@storybook/experimental-addon-test': `file:${vitestAddonPath}`,