-
Notifications
You must be signed in to change notification settings - Fork 112
Vuex would throw warnings about modules getting overridden if I call render() in more than one test #158
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
Comments
Hi! Sorry this slipped through the cracks. Do you still experience this issue? Could you share a snippet/codesandbox/repo where the issue could be reproduced? That'd help a lot. I'd suggest making sure you're not sharing the component instance between tests. Cheers! 👋 |
@davidchai717 Is the example code you provided ( const store = { state: { foo: true }, modules: {...} };
render(component, { store }); But if that isn't your issue then as afontcu said, a code snippet would be really helpful in getting to the bottom of this. |
Closing as we fixed the issue in Discord :) Turns out lodash' |
@afontcu What commit fixed this? Has it been released already? I'm seeing the same issue on 5.6.2 right now. |
The fix was to avoid mutating the original store when using lodash |
Ahh, I see. Thanks! |
Oddly this doesn't have if you only have one test that calls render(component, { state: { foo: true }, modules: {...} }). But once I start adding in a second test where I need to render the same component with a Vuex store, it immediately starts throwing these module warnings.
I'd definitely appreciate some assistance here.
The text was updated successfully, but these errors were encountered: