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

Separate vis test and run on storybook #103

Open
unional opened this issue Nov 28, 2024 · 3 comments
Open

Separate vis test and run on storybook #103

unional opened this issue Nov 28, 2024 · 3 comments

Comments

@unional
Copy link
Contributor

unional commented Nov 28, 2024

Add a provider on this:

image

@unional
Copy link
Contributor Author

unional commented Jan 2, 2025

Consider it as a component test when shouldTakeSnapshot is true or when there are rendered result?

May need to see it in a bigger picture. What about task.type = story?

@unional
Copy link
Contributor Author

unional commented Jan 9, 2025

Error: Invalid Chai property: toMatchImageSnapshot

That looks like somehow you or the system is using expect from chai instead of vitest.
Do you get that error during the afterEach (i.e. the auto snapshot) or in your code?

vitest-plugin-vis vs vitest-plugin-vis/esm

This is because your project is not using module resolution that supports ESM. The package didn't provide top-level main or types: https://github.com/repobuddy/storybook-addon-vis/blob/main/packages/vitest-plugin-vis/package.json
Didn't plan to do that but I can add the types field to make TypeScript happy.

Can you create a different issue for these? This issue is about filtering and organizing the tests for storybook visual test widget. 🙇

@joekrump
Copy link
Contributor

joekrump commented Jan 9, 2025

Can you create a different issue for these? This issue is about filtering and organizing the tests for storybook visual test widget. 🙇

💯 sorry for cluttering this one up. Moved them over to these

  1. "Error: Invalid Chai property: toMatchImageSnapshot" when using vitest globals and preset: "auto" #154
  2. typescript type definitions not found when not using ESM module resolution #153

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

No branches or pull requests

2 participants