vuejs-templates / webpack

A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
MIT License
9.7k stars 4.39k forks source link

Use Jest and vue-test-utils #817

Open eddyerburgh opened 7 years ago

eddyerburgh commented 7 years ago

I'd like to make a PR that replaces mocha and karma with Jest, as well as adding vue-test-utils to the project.

The reasons for Jest over Karma/ mocha:

Another issue is requiring everything the src directory. This installs vue-router, which adds $route as a read only property to the global Vue class. This means people can't stub $route in tests, and if you don't know all the files are required before running the tests, it can be difficult to debug

LinusBorg commented 7 years ago

You have my vote :-P

eddyerburgh commented 7 years ago

I've made a PR to replace karma and mocha. I'll make another PR to add vue-test-utils when it's release

eddyerburgh commented 7 years ago

I've created a vue jest preprocessor that adds source maps. In light of the patent drama, are we still happy to go ahead with replacing Karma and mocha with Jest?

LinusBorg commented 6 years ago

Okay so we got jest included - go get that 1.0.0 release for vue-test-utils and we can close this :)