Skip to content

Function: storybookConfig()

Documentation / @wtf/project-vitest / storybook / storybookConfig

function storybookConfig(__namedParameters): Promise<UserConfig>;

Defined in: packages/project-vitest/src/storybook.ts:49

The Vitest config of a package’s stories, each a test, in a headless Chromium by Playwright, as browserConfig has it: the workspace’s packages read from their source, or from the build with TEST_FROM=dist; 30 seconds a test; and the reports of the CI. Its project is named storybook, and its tests are its stories alone: the plugin of @storybook/addon-vitest, which comes after the package’s own plugins, gives the files its Storybook takes, which Vite adds to an include of none.

import { resolve } from 'node:path'
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin'
import { storybookConfig } from '@wtf/project-vitest/storybook'
export default storybookConfig({
storybook: storybookTest({ configDir: resolve(import.meta.dirname, '.storybook') })
})

Parameters

ParameterType
__namedParametersStorybookOptions

Returns

Promise<UserConfig>