Giter Site home page Giter Site logo

Proposal: init test setup with Nuxi about cli HOT 4 OPEN

rinux55 avatar rinux55 commented on June 9, 2024 3
Proposal: init test setup with Nuxi

from cli.

Comments (4)

pi0 avatar pi0 commented on June 9, 2024 1

Hi. I think it is a nice idea. I think we can move it forward in two directions:

  1. A new app-test template in nuxt/starter that can initialize /test directory. Using nuxi init -t test --install can achieve (almost) the same result
  2. Later integrate it with upcoming scaffolding tooling to allow defining the above steps without the need of a template (old tracker: #57)

from cli.

rinux55 avatar rinux55 commented on June 9, 2024 1
  • A new app-test template in nuxt/starter that can initialize /test directory. Using nuxi init -t test --install can achieve (almost) the same result

I am not super familiar with the starter templates, but will this allow for a wizard like approach like asking for playwright etc, or can this only create a project from a template without any options?

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:

  • Later integrate it with upcoming scaffolding tooling to allow defining the above steps without the need of a template (old tracker: #57)

sounds like the ideal solution. If there is any way I can help making this a reality, let's have a chat.

from cli.

rinux55 avatar rinux55 commented on June 9, 2024 1

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:

  • test-unit
  • test-e2e
  • test-e2e-unit

Personally, I prefer @testing-library, but of course this feature is not for me alone - another person might prefer @vue/test-utils, so then we'd have to branch out more. Or, we keep things very simple, but that would mean having to go back in the code and remove or change packages - which at that point is as much work as just initialising the tests yourself.

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!

from cli.

pi0 avatar pi0 commented on June 9, 2024

I am not super familiar with the starter templates, but will this allow for a wizard-like approach like asking for a playwright, etc, or can this only create a project from a template without any options?

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?

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.