Giter VIP home page Giter VIP logo

Comments (6)

JessicaSachs avatar JessicaSachs commented on May 23, 2024 2

I'm happy to take a stab at the setup/environment/configuration part of the docs

from test-utils.

dobromir-hristov avatar dobromir-hristov commented on May 23, 2024 1

Contrary to belief, I have gotten many questions, probably you as well, on how to setup VTU with Jest/Mocha/SomethingNoOneEverUsed.js even with the old docs having sections for that.

I dont think this will change. I would not go into setting up my own webpack setup, but then again people use Rollup or Parcel, so rough guidelines are necessary I think.

from test-utils.

dobromir-hristov avatar dobromir-hristov commented on May 23, 2024 1

yeah, as long as we explain why those are needed in a few words, thats more than enough :) We will always have to reply to such questions hehe

from test-utils.

lmiller1990 avatar lmiller1990 commented on May 23, 2024

I added something very minimal here for the first two steps https://github.com/vuejs/vue-test-utils-next-docs/blob/master/src/guide/installation.md

It is not polished at all but it's enough to get started with VTU next. The first line is a lie - vtu next is not on NPM yet, was just getting ready.

We should probably work with sodatea to get a vue-cli plugin with vue-jest next (aka vue-jest 5) and vtu next.

from test-utils.

lmiller1990 avatar lmiller1990 commented on May 23, 2024

Hm, Vue itself does not provide docs on how to configure webpack/parcel/vue-loader.

We could provide something generic (since these kind of specific guides tend to get out of date first). The ideas are the same for all runners. So something along the lines of:

  • VTU requires a DOM environment to run. Most commonly used it jsdom. document must be globally available before using VTU.
  • Your test runner needs to understand vue files. Jest uses vue-jest, and webpack-based runners (mocha-webpack) can use vue-loader.
  • Here is a basic template using Jest and Webpack

Low on implementation details, just a few sentences explaining the basic and a link or two to some working templates so people can get going asap.

I have a basic template here we could clean up and use.

Also we should work on a cli-plugin.

from test-utils.

lmiller1990 avatar lmiller1990 commented on May 23, 2024

Sure! Thanks.

from test-utils.

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.