-
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
Fix two bugs in autodestroy #1723
Conversation
💪
Op vr 23 okt. 2020 11:28 schreef Pieter De Decker <notifications@github.com
…:
My colleague @Kjoep <https://github.com/Kjoep> did some bugfixes. I'm
filling out the form on his behalf to get it integrated upstream.
*What kind of change does this PR introduce?* (check at least one)
- Bugfix
- Feature
- Code style update
- Refactor
- Build-related changes
- Other, please describe:
*Does this PR introduce a breaking change?* (check one)
- Yes
- No
If yes, please describe the impact and migration path for existing
applications:
*The PR fulfills these requirements:*
- It's submitted to the dev branch.
- When resolving a specific issue, it's referenced in the PR's title
(e.g. fix #xxx[,#xxx], where "xxx" is the issue number) - *It's not
related to an existing issue thread as far as we know*
- All tests are passing:
https://github.com/vuejs/vue-test-utils/blob/dev/.github/CONTRIBUTING.md#development-setup
- *Awaiting build*
- New/updated tests are included - *The TypeScript change is not
testable. Anything else the author should cover?*
*Other information:*
------------------------------
You can view, comment on, or merge this pull request online at:
#1723
Commit Summary
- fix: ignore non-vue wrapper for auto-destroy
- fix: expose enableAutoDestroy to typescript
File Changes
- *M* packages/test-utils/dist/vue-test-utils.js
<https://github.com/vuejs/vue-test-utils/pull/1723/files#diff-84e0314b904652c9d7d6721189693e86869f5f4e914ac662c1bc5726c1b7cb4b>
(10)
- *M* packages/test-utils/src/auto-destroy.js
<https://github.com/vuejs/vue-test-utils/pull/1723/files#diff-743f1c913e64fdaa9376329cfe2aaf7a2a63fa84b300fe7ed9215ffa647df5c1>
(6)
- *M* packages/test-utils/types/index.d.ts
<https://github.com/vuejs/vue-test-utils/pull/1723/files#diff-295b12b9a221a7aa6d6d3ac9cbbe732796c98f1be23295e31bf7a56d47332712>
(2)
Patch Links:
- https://github.com/vuejs/vue-test-utils/pull/1723.patch
- https://github.com/vuejs/vue-test-utils/pull/1723.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1723>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABV6DDFMYH2HH3DDEUBQ55TSMFECVANCNFSM4S4J4FBQ>
.
|
Hi! Thanks for this 🙌 Could you add some unit test to assert that the expected behavior is actually happening? |
@afontcu Added a unit test - this one fails without the fix, but succeeds now. |
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 good, just need to revert the dist files - we only update those when we do a release.
@@ -11223,12 +11223,12 @@ function enableAutoDestroy(hook) { | |||
isEnabled = true; | |||
|
|||
hook(function () { | |||
wrapperInstances.forEach(function (wrapper) { | |||
wrapperInstances.forEach((wrapper) => { |
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.
can you revert this? we only update dist
when we do a release
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.
Done, we've reverted the code change.
We've also removed the second commit since it was obsolete after #1724 got merged: |
I'll release in the next day or two, thanks! |
My colleague @Kjoep did some bugfixes. I'm filling out the form on his behalf to get it merged into the mainline.
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) - It's not related to an existing issue thread as far as we knowOther information: