-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Proposal: init test setup with Nuxi #374
Comments
Hi. I think it is a nice idea. I think we can move it forward in two directions:
|
I am not super familiar with the starter templates, but will this allow for a wizard like approach like asking for I'm assuming this allows to only create a starter template with tests, and not a combination of module and tests? I feel that this is too limiting, as in the ideal world it should be easy to add tests anywhere in a nuxt project. For instance, I'm creating Layers often, it would be really nice to have one command take care of it all. My vision is that testing Nuxt applications (and with that, setting up testing) should be just as easy and fun as it is to work with the other aspects of Nuxt. That is why your second suggestion:
sounds like the ideal solution. If there is any way I can help making this a reality, let's have a chat. |
We need to make multiple starters (check branches). It is a current limitation that will be solvable with (2) indeed. I will keep you/this issue posted on any progress but i think adding a starter template for app testing even if limited might be a good start wdyt? |
thanks for keeping us posted! I'm a bit on the fence if I think the starter template is a good start, my reasonings being: For my personal situation, I rarely need e2e tests. This would mean I'd have to manually remove e2e tests, or, there should be the following branches:
Personally, I prefer If i'd have to go back in the code and change things every time I would just be annoyed by the feature and probably not use it at all. But having this feature does mean having all these branches, and keeping them up to date, and having the docs to make people aware this exists. With that, I really think it's better to wait when we can build something which works really well! |
One thing I'm really missing from
nuxi
is a way to quickly initialise a test setup.My proposal is that after people have initialised a project with
nuxi init
, they can run a command likenuxi add tests
ornuxi tests init
which will start a small wizard to set up everything related to testing.Running this command will:
vitest
,@nuxt/test-utils
vitest-environment-nuxt
vitest.config.ts
@vue/test-utils
or@testing-library/vue
for unit testinghappy-dom
orjsdom
playwright
for e2e testingvitest.config
accordinglyI'd be down to contribute with a PR, but first I'm interested in some feedback! What do you think of this?
The text was updated successfully, but these errors were encountered: