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

#1888: adding stubbing for keep-alive #1889

Merged
merged 1 commit into from Dec 2, 2022
Merged

Conversation

laddi-netapp
Copy link
Contributor

It's very simple, the implementation is basically similar to what was done for Teleport, changing the rendering of children for KeepAlive to a function.

@netlify
Copy link

netlify bot commented Nov 28, 2022

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit c71a748
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-docs/deploys/6384dc3bbc412f0008f1991f
😎 Deploy Preview https://deploy-preview-1889--vue-test-utils-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks 👍

I added a question for the other reviewers about supporting KeepAlive: true

@@ -124,6 +125,17 @@ export function createStubComponentsTransformer({
})
}

// stub keep-alive by default via config.global.stubs
if ((type as any) === KeepAlive && 'keep-alive' in stubs) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should support KeepAlive: true as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could also use isKeepAlive instead of (type as any) === KeepAlive (and do the same for Teleport)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we just push this commit on behalf of the original author and ship this?

Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

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

Successfully merging this pull request may close these issues.

None yet

3 participants