testing-library/vue-testing-library

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

Opened this issue · 1 comments

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

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/@vue+test-utils@2.4.6/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:8222:19
 ❯ mount ../../node_modules/.pnpm/@vue+test-utils@2.4.6/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:8385:14
 ❯ Proxy.render ../../node_modules/.pnpm/@testing-library+vue@8.1.0_@vue+compiler-sfc@3.5.13_vue@3.5.13_typescript@5.1.6_/node_modules/@testing-library/vue/dist/render.js: