-
Notifications
You must be signed in to change notification settings - Fork 668
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
Migrate to jest 2 #1629
Migrate to jest 2 #1629
Conversation
aa7852f
to
68eddc5
Compare
@lmiller1990 Thanks! COVID-19 in the USA has left me with a bit more time than I would usually have available 😅
All good! I figured it couldn't hurt to ask 😄. We could merge df19c1b here as is as long as you and the team are comfortable with it.
✔️
✔️
✔️ There shouldn't be any immediate risk to these changes, as the bundles are the exact same between branches. I would double check me on that though 😉 . I am in no rush to release or merge by any means. Whatever it takes for us to ship this with confidence and to do it right.
The only thing that I believe is of immediate concern is the removed build/release scripts in 28fffd8#diff-b9cfc7f2cdf78a7f4b91a753d10865a2L9 which can be seen here in the file diff. We can add that back in pretty easily, like here before merging. |
As far as the rollup upgrade is concerned, it isn't necessary for this release, which we could merge it eagerly after just to make it easier to review separate from this chunk of changes. I had some time to look into the upgrade. The good news for us is that virtually nothing has changed for us between the plugin updates and rollup 2.x! I performed those upgraded changes in AtofStryker@57c4a9c (Sorry, I couldn't help myself 🤣 ) and made a gist of that diff for the team/community review. None of the |
I also have a few other upgrades we can incorporate in separate PRs, including vuepress, core-js 3 (previously blocked by old vuepress and corejs 2.x is deprecated), and chalk (that was definitely the easiest one!). I actually don't think we need |
I can add that commit to this branch, update the description, and mark it ready for review if that is the course of action we want to take 😄 |
@AtofStryker that'd be great, thanks a lot! Thank you very much for "owning" this feature 👍 excited to drop a tweet about this when we merge it, lmk your Twitter if you have one so I can tag you. |
c119513
to
58b257f
Compare
this.vm[key] === data[key] || this.vm.$attrs[key] === data[key] | ||
this.vm[key] === data[key] || | ||
// $FlowIgnore : Problem with possibly null this.vm | ||
(this.vm.$attrs && this.vm.$attrs[key] === data[key]) |
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 had a few issues in CI recently in regards to this guy in vue 2.3. Looks like I introduced a small regression in VTU for setProps
for vue version 2.3 in #1618. The stack trace was a bit difficult to track down, but this should fix the issues seen
After converting to Jest, browser tests were removed due to capatability issues. This reimplements the browser tests with similar techniques. All related webpack/loaders have been updated to use the latest stable releases Chrome/HeadlessChrome is now being used to run these tests over the deprecated PhantomJS Karma and Jasmine are being used as a test runner while leveraging Jest's expect/assertion and mock/stubbing libraries Highly inspired by https://github.com/tom-sherman/blog/blob/master/posts/02-running-jest-tests-in-a-browser.md. 1629
Add back build scripts that were initially removed from jest migration
JSDOM and JSDOM-Global are no longer used with the removal of the mocha tests. JSDOM is still used implicitly by jest.
58b257f
to
0eb83a1
Compare
@lmiller1990 sure thing! I appreciate you letting me be so involved in this and being so welcome to contributions. I'm a bad technologist and rarely touch social media these days 😆 . But I would definitely appreciate the tag. My twitter is https://twitter.com/AtofStryker. As far as the PR goes. I made a few changes to address a regression here, but exercised CI after changes and it looks good to me. Build scripts are re added and I removed the |
I will get this merged this week. |
Ok! It seems like everything is working. I am having many problems running this locally though. Linting failing...
Hm. Edit: Ok, this solved it: babel/babel-eslint#681 (comment) |
When I do |
@lmiller1990 Yeah that is expected. Karma tests by default run in watch mode, so when changes are made (locally) the tests rerun. If we don't want that behavior, we can just set
Glad babel/babel-eslint#681 (comment) solved it. I didn't have issues linting locally, but I also reinstalled from lock after deduping. That also might help, but changing the rule should work just as well I'll give the changes a pull locally and see if I have any issues Edit: changes locally look good on my end with the latest commit. |
BTW @lmiller1990 were you having any other issues or was it just the linting? |
Everything else works great. I am guessing It might be good to have it set locally by default (can you make that change?) I feel like other people contributing will have the same problem I just did. Other than that, happy to merge and do a release! |
Set singleRun option in karma to true locally and in CI so the test process always terminates when finished
@lmiller1990 correct. The config is utilizing the circle var
Definitely! On revisiting, the watching behavior was probably a poor choice on my end 😆 . Definitely don't want others to run into snags or problems when contributing. We can just set
Sweet! We should be good to go then! 🎉 Once we get this merged in, I will open a few other PRs for some other library upgrades in, such as |
It's merged!!!! 🎉 thanks! |
It's out. |
A rebase of #1587 with browser tests.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch.fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
This branch introduces moving VTU to jest over mocha, as well as using a few different strategies to run in the browser (discussed below)