-
Notifications
You must be signed in to change notification settings - Fork 125
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
UPDATE for Vue3 ( = vuex 4.x, vue-router 4.x) #100
Conversation
"vue": "^3.0.5", | ||
"vue-router": "^4.0.2", | ||
"vuex": "^4.0.0-rc.2" |
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 want to update other dependencies, but that should be other PR to keep it simple...
router, | ||
render: (h) => h('router-view') | ||
}).$mount() | ||
const rootEl = document.createElement('div') |
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.
Wouldn't it be easier and safer to use vue test utils?
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.
Ok, I will try to use vue test utils!
(Actually, I have not use it yet 😅 )
Thank you so much for the PR! I've added test for the time traveling and now the coverage is 100% 🙌 As @posva mentioned, I think we should use vue-test-utils ideally but since it's quite small test, I would go ahead and merge this one, then maybe add playground to do the final manual test, then I think we're ready to go 👍 |
Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
To use vuex-router-sync in Vue 3.x, I updated vue, vuex and vue-router!
Changed src and test,
currently the test is not perfect, help...😭About vue-routers's afterEachTo mutate latest route info, this package using vue-router'safterEach
function.But vue-router v4.x only export add function, and doesn't export any list that registered afterEach.I want to testunsync
correctly remove router's afterEach hook, but I have no idea.About vuex's watchTo sync router on store change, this package using vuex'swatch
functionBut I can't find a way to confirm what is registered in watch hooks!I want to testunsync
correctly remove vuex's watch hook, but I have no idea...About unsync test