-
Notifications
You must be signed in to change notification settings - Fork 668
Allow testing src directly #1396
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll pull this down and try it out hopefully in the next day or two, but everything looks like it makes sense... awesome job, I'm really excited to use the watcher for the tests.
Just to confirm my suspicion, when the Karma tests run it still runs the "old" way which is to bundle the entire project and load the dist
file?
Yep. We only run against the |
Great... if it all works the same, sounds good to me. Just left one comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just added a minor nitpick suggestion.
👍
Co-Authored-By: Adrià Fontcuberta <[email protected]>
…vuejs/vue-test-utils into feat/allow-testing-src-directly
# Conflicts: # yarn.lock
Description
This PR allows testing the
src
files directly, instead of the old way, by building the package first.The main advantages are speed and debugging. In-code breakpoints now should work properly.
Watch
mode also works very fast.The main changes were:
~vue/test-utils
alias, as it was causing more problems than it was solving.src
, only when in dev testing mode.test-utils
andserver-test-utils
exports from a default exported object to a named export. This should not affect usage after building the package, as we are using cjs format in the end. Adjust where necessary.How to run
If you want to run the tests against the source:
Thanks to Bogdan for helping debug the initial Webpack config.