Skip to content
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

Add support for async components #245

Closed
eddyerburgh opened this issue Dec 9, 2017 · 5 comments
Closed

Add support for async components #245

eddyerburgh opened this issue Dec 9, 2017 · 5 comments

Comments

@eddyerburgh
Copy link
Member

We need to add support for async components

@wtho
Copy link
Contributor

wtho commented Dec 10, 2017

Edit: Ok I see it is not related to Webpack, got confused by the docs.


How could async components be integrated in the current test setup of this repository? Should webpack provide the possibility to split? Or should we mock statically whatever splitted bundle webpack would serve? Can we test this without extending and rewriting the setup?

Any ideas on this?

I guess this issue also includes advanced async components?

@wtho
Copy link
Contributor

wtho commented Dec 11, 2017

Looking at what the Vue vdom does, my suggestion would be to return a new AsyncWrapper, that first contains a placeholder or nothing, and when the promise resolves or the function calls back, it becomes a normal wrapper.

The tester would then have the need of flushing promises to continue the tests. If flushing promises is not an option, we could expose a loading promise or callback from the AsyncWrapper.

If we do not directly return a wrapper from mount/shallow, we would change the whole library interface.

Does the current setup work, if the child components are async? They should be instantiated by Vue, if I am not wrong?

Any other thoughts so far?

@eddyerburgh
Copy link
Member Author

I haven't investigated into this yet.

You're right, I don't think we should change the behavior of mount and shallow to not return a wrapper. I'll add some more comments when I've had a look into it.

@McSneaky
Copy link

Any updates?

@eddyerburgh
Copy link
Member Author

Closing in favor of #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants