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

"Error: Invalid Chai property: toMatchImageSnapshot" when using vitest globals and preset: "auto" #154

Open
joekrump opened this issue Jan 9, 2025 · 1 comment

Comments

@joekrump
Copy link
Contributor

joekrump commented Jan 9, 2025

Minimal repro steps:

In vitest config file have the following:

plugins: [
  vis({
    preset: "auto",
    // other config options
  }),
],
test: {
  globals: true,
  //... other config options
}
@unional
Copy link
Contributor

unional commented Jan 10, 2025

Hi, I can't reproduce it with this setting.

One possibility is that you have 2 versions of vitest in your system, so vitest-plugin-vis gets one version and extend that, but you are using another version in your test.

You can check that with pnpm why -r vitest or similar command.

Is your repo a monorepo and you are using Vitest workspace?

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