File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -407,6 +407,8 @@ export default async function postInstall(options: PostinstallOptions) {
407407 // If there's an existing config, we create a workspace file so we can run Storybook tests alongside.
408408 const extension = extname ( rootConfig ) ;
409409 const browserWorkspaceFile = resolve ( dirname ( rootConfig ) , `vitest.workspace${ extension } ` ) ;
410+ // to be set in vitest config
411+ const vitestSetupFilePath = relative ( dirname ( browserWorkspaceFile ) , vitestSetupFile ) ;
410412
411413 logger . line ( 1 ) ;
412414 logger . plain ( `${ step } Creating a Vitest project workspace file:` ) ;
@@ -442,7 +444,7 @@ export default async function postInstall(options: PostinstallOptions) {
442444 name: 'chromium',
443445 provider: 'playwright',
444446 },
445- setupFiles: ['./.storybook/vitest.setup.ts '],
447+ setupFiles: ['${ vitestSetupFilePath } '],
446448 },
447449 },
448450 ]);
You can’t perform that action at this time.
0 commit comments