Skip to content

Commit

Permalink
Adjust sandbox parts to setup addon test the same way as its postinst…
Browse files Browse the repository at this point in the history
…all script
  • Loading branch information
valentinpalkovic committed Jan 8, 2025
1 parent fd79fd6 commit 5affbc2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/tasks/sandbox-parts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,22 @@ export async function setupVitest(details: TemplateDetails, options: PassedOptio
dedent`
import { defineWorkspace, defaultExclude } from "vitest/config";
import { storybookTest } from "@storybook/experimental-addon-test/vitest-plugin";
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import viteConfig from './vite.config';
${frameworkPluginImport}
const dirname =
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
export default defineWorkspace([
{
${!isNextjs ? `extends: "${viteConfigPath}",` : ''}
plugins: [
storybookTest({
configDir: path.join(dirname, '.storybook'),
storybookScript: "yarn storybook --ci",
tags: {
include: ["vitest"],
Expand Down

0 comments on commit 5affbc2

Please sign in to comment.