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

Update @vue/test-utils to 2.4.6 to fix transition stub error #322

Open
Hai-San opened this issue Dec 11, 2024 · 1 comment
Open

Update @vue/test-utils to 2.4.6 to fix transition stub error #322

Hai-San opened this issue Dec 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Hai-San
Copy link

Hai-San commented Dec 11, 2024

Starting with version 3.4.22, Vue will now generate an alert for components that use transition.

When I checked, I saw that this was converted to version 2.4.6 of @vue/test-utils, but vue-testing-library still uses version 2.4.1, where the alert appears.

Here is the ISSUE report in @vue/test-utils

Here is the PR for the fix in @vue/test-utils

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

To reproduce the bug, just have a component that uses and vue 3.4.22 or higher and @testing-library/vue 8.1.0

Related information:

  • @testing-library/vue version: 8.1.0
  • Vue version: 3.4.22 or bigger
  • node version: 20
  • npm (or yarn) version: pnpm 9.15.0
@Hai-San Hai-San added the bug Something isn't working label Dec 11, 2024
@Hai-San
Copy link
Author

Hai-San commented Dec 11, 2024

I tried the following temporary solution:

  "pnpm": {
    "overrides": {
      "@testing-library/vue>@vue/test-utils@2": "^2.4.6"
    }
  }

But several tests fail with the following error:

TypeError: Vue.createApp is not a function
 ❯ createInstance ../../node_modules/.pnpm/@[email protected]/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:8222:19
 ❯ mount ../../node_modules/.pnpm/@[email protected]/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:8385:14
 ❯ Proxy.render ../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_/node_modules/@testing-library/vue/dist/render.js:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant