Skip to content

Use Jest and vue-test-utils #817

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

Open
eddyerburgh opened this issue Jul 22, 2017 · 4 comments
Open

Use Jest and vue-test-utils #817

eddyerburgh opened this issue Jul 22, 2017 · 4 comments

Comments

@eddyerburgh
Copy link
Contributor

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:

  • Faster
  • Less config
  • No browser
  • No webpack for tests

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
Copy link
Contributor

You have my vote :-P

@eddyerburgh
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants