-
Notifications
You must be signed in to change notification settings - Fork 72
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
Cant use utils/composables within tests #802
Comments
Currently only the client-side half of Nuxt is available within unit testing environment, which does include your composables in I note that you are using e2e tests - nothing in your Nuxt environment is exposed in an e2e environment. You would need to directly fetch from an api endpoint. You can run code within your app that tests for |
Thanks for your answers! I am getting "somewhere" testing my server routes, if there wouldnt be this bug: #795 - So I am kinda working blind + every time I need to wait 15s for the next result. |
Yeah, that's a pain. |
Describe the feature
Within tests utils and composables (especially from the server folder) should be available, currently they are not:
https://stackblitz.com/edit/github-krtpdn-tvzxcc?file=test%2Fsomething.spec.ts
Usecase:
I want to test server endpoints but for that I need to do some database queries. Within my application I use Drizzle for that which I wrapped in a util. I would like to reuse exactly this utils and possibly other composables.
Additional information
Final checks
The text was updated successfully, but these errors were encountered: