testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.06k stars 110 forks source link

render function has only two parameters: configurationCb is missing 😱 #269

Closed vfportero closed 2 years ago

vfportero commented 2 years ago

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

I'm following the vue i18n example (https://github.com/testing-library/vue-testing-library/blob/main/src/__tests__/translations-vue-i18n.js) but the exported render function doesn't have the callback parameter to setup the vue i18n plugin.

As seen in the index.d.ts, the method function has only two parameters but the documentations says that must have three.

To Reproduce Steps to reproduce the behavior:

Just try to follow the vue-118n example with the version 6.5.1 of testing-library/vue

Expected behavior

Can pass a third parameter on the render function to setup vue 3 plugins to the mounted component.

Screenshots

image image

Related information:

afontcu commented 2 years ago

Hi!

you're using Vue 3, but following the example for Vue 2. Code for Vue 3 lives in next branch, so this is the appropriate vue-i18n example: https://github.com/testing-library/vue-testing-library/blob/next/src/__tests__/vue-i18n.js

vfportero commented 2 years ago

Ok, thanks @afontcu, i will try that way.

(the given url is missing the extension part. This is the correct one: https://github.com/testing-library/vue-testing-library/blob/next/src/__tests__/vue-i18n.js)

Hi!

you're using Vue 3, but following the example for Vue 2. Code for Vue 3 lives in next branch, so this is the appropriate vue-i18n example: https://github.com/testing-library/vue-testing-library/blob/next/src/__tests__/vue-i18n.