-
Notifications
You must be signed in to change notification settings - Fork 278
Description
Hi,
I've some projects that use BootstrapVue that I'd like to migrate to Vue 3. Using @vue/compat I can run these projects without issues but I couldn't find a way to migrate their tests to the new tools.
Initially I was using Vue Testing Library v5 (VTU1)
Describe the question
Is it possible to use VTU2 with Vue 2 plugins like BootstrapVue and @vue/compat?
To Reproduce
I've set a minimal repo here: https://github.com/fgsalomon/vue3-bootstrap-vue-issues
This repo contains a component TestBootstrap.vue that uses BootstrapVue components.
The component has a unit test with Vue Testing Library v7 (VTU2).
Expected behavior
The test runs successfully.
Currently yarn test:unit fails with the error when trying to install BootstrapVue plugin:
TypeError: Vue.extend is not a function
Related information:
System:
OS: macOS 13.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 95.05 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
npmPackages:
@testing-library/vue: ^7.0.0 => 7.0.0
@vue/test-utils: ^2.3.2 => 2.3.2
vitest: ^0.31.0 => 0.31.0
vue: ^3.3.2 => 3.3.2
Thank you.