File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,11 @@ export interface StorybookStoriesStory {
3636 }
3737}
3838
39- type StoriesFilterFn = < V7 = true > ( story : V7 extends true ? StorybookIndexStory : StorybookStoriesStory ) => boolean
40-
4139export const storybookPlaywright = {
42- getStories : ( pathToStorybookIndexJson : string , storyFilterFn : StoriesFilterFn ) => {
40+ getStories : < V7 = true > (
41+ pathToStorybookIndexJson : string ,
42+ storyFilterFn : ( story : V7 extends true ? StorybookIndexStory : StorybookStoriesStory ) => boolean
43+ ) => {
4344 if ( ! fse . existsSync ( pathToStorybookIndexJson ) ) {
4445 console . log ( pathToStorybookIndexJson , "doesn't exist." )
4546 throw new Error ( 'Please build storybook before running tests!' )
@@ -48,6 +49,8 @@ export const storybookPlaywright = {
4849
4950 const storyObject = storybookIndexJson . entries || storybookIndexJson . stories
5051
52+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
53+ // @ts -ignore
5154 const stories = Object . values ( storyObject ) . filter ( storyFilterFn )
5255
5356 return stories
You can’t perform that action at this time.
0 commit comments