File tree Expand file tree Collapse file tree 2 files changed +26
-30
lines changed
Expand file tree Collapse file tree 2 files changed +26
-30
lines changed Original file line number Diff line number Diff line change 1+ import path from 'node:path' ;
2+ import { fileURLToPath } from 'node:url' ;
3+
4+ import { storybookTest } from '@storybook/addon-vitest/vitest-plugin' ;
15import react from '@vitejs/plugin-react-swc' ;
26import type { UserConfig } from 'vite' ;
37
8+ const dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
9+
410const config : UserConfig = {
511 plugins : [
612 react ( {
@@ -16,6 +22,26 @@ const config: UserConfig = {
1622 '@chakra-ui/react/styled-system' ,
1723 ] ,
1824 } ,
25+ test : {
26+ projects : [
27+ {
28+ extends : true ,
29+ plugins : [
30+ storybookTest ( { configDir : path . join ( dirname , '.storybook' ) } ) ,
31+ ] ,
32+ test : {
33+ name : 'storybook' ,
34+ browser : {
35+ enabled : true ,
36+ headless : true ,
37+ provider : 'playwright' ,
38+ instances : [ { browser : 'chromium' } ] ,
39+ } ,
40+ setupFiles : [ '.storybook/vitest.setup.ts' ] ,
41+ } ,
42+ } ,
43+ ] ,
44+ } ,
1945} ;
2046
2147export { config as default } ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments