Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storybook implをアップデートしてもUIテストがスキップされる #11265

Closed
saschanaz opened this issue Jul 13, 2023 · 1 comment · Fixed by #14124
Closed

storybook implをアップデートしてもUIテストがスキップされる #11265

saschanaz opened this issue Jul 13, 2023 · 1 comment · Fixed by #14124
Labels

Comments

@saschanaz
Copy link
Member

#11262

image

@saschanaz
Copy link
Member Author

const modules = new Set(
process.argv
.slice(2)
.map((arg) =>
path.relative(
path.resolve(__dirname, '..'),
path.resolve(__dirname, '../../..', arg)
)
)
.map((path) => path.replace(/(?:(?<=\.stories)\.(?:impl|meta)|\.msw)(?=\.ts$)/g, ''))
.map((path) => (path.startsWith('.') ? path : `./${path}`))
);

const stories = micromatch(
Array.from(modules),
main.stories.map((story) => `./${path.relative('..', story)}`)
);

こうなっていますが

  1. pathに./が含まれていたら動かない
    > require('micromatch')(['./foo'], ['./f*'])
    []
    > require('micromatch')(['foo'], ['./f*'])
    [ 'foo' ]
    
  2. storybookではpicomatchを使ってparseして使う

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant