Exposing vue3 plugin to allow import to other script for testing purpose #1559
stephenkhoo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently we're trying to setup vitest for vue3 components integrating with inertiajs.
We use $page, $inertia which is installed through inertiajs plugin.
However, in the tests, we only use mount from @vue/test-utils which will not run entire inertia app
It can setup with config.globals.plugins if we can do something like
import { plugin as InertiaPlugin } from '@inertiajs/vue3'
I think in earlier time, @inertiajs/inertia-vue3 we have access to the plugin.
But now it is no longer exposed for import directly.
This is the attempt to run vitest for vue3 app integrating inertiajs.
If there's better way to run test interacting with inertiajs part in vitest, please share with me also.
Beta Was this translation helpful? Give feedback.
All reactions