refactor(config): move storybook and vitest configs to config/, import app.css in storybook preview

This commit is contained in:
Ilia Mashkov
2026-03-07 11:16:21 +03:00
parent 45e3ef77c6
commit 3f9f6e3f93
7 changed files with 7 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
import '../../src/app/styles/app.css';
import type { Preview } from '@storybook/sveltekit'
const preview: Preview = {

View File

@@ -19,8 +19,8 @@
"test:e2e": "playwright test",
"test:all": "bun run test && bun run test:e2e",
"test:coverage": "vitest --coverage",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"storybook": "storybook dev -p 6006 --config-dir config/storybook",
"build-storybook": "storybook build --config-dir config/storybook"
},
"devDependencies": {
"@biomejs/biome": "^2.4.5",

View File

@@ -20,7 +20,7 @@ export default defineConfig({
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./src/shared/config/tests/setup.ts"],
setupFiles: ["./config/vitest/setup.ts"],
include: ["src/**/*.test.{js,ts}"],
exclude: ["src/**/*.e2e.{js,ts}"],
projects: [
@@ -30,7 +30,7 @@ export default defineConfig({
// The plugin will run tests for the stories defined in your Storybook config
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
storybookTest({
configDir: path.join(dirname, ".storybook"),
configDir: path.join(dirname, "config/storybook"),
}),
],
test: {
@@ -45,7 +45,7 @@ export default defineConfig({
},
],
},
setupFiles: [".storybook/vitest.setup.ts"],
setupFiles: ["./config/storybook/vitest.setup.ts"],
},
},
],

View File

@@ -17,7 +17,7 @@ export default defineConfig({
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./src/shared/config/tests/setup.ts"],
setupFiles: ["./config/vitest/setup.ts"],
include: ["src/**/*.test.{js,ts}"],
exclude: ["src/**/*.e2e.{js,ts}"],
},