Skip to content

test(runtime-core): test createSlots #115

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

Closed
wants to merge 2 commits into from

Conversation

kyle-hall
Copy link
Contributor

Hi! I'd like to help with the test coverage of Vue 3, but I'm having some difficulty understanding how things work. I'm putting up this PR in the hopes of getting a push in the right direction on how to test some of this stuff. I started with createSlots, and the problem I'm running into is that I don't understand how to create a dummy Record to pass into createSlots. I have tried looking through the other tests that create slots, such as https://github.com/vuejs/vue-next/blob/8133b3867ae3d67bbd05a8ca06c5659275bc5942/packages/runtime-core/__tests__/h.spec.ts#L31 which creates a Slot, but not a Record. I feel like I'm missing something obvious, but can't see what that might be. Could I have a little help understanding?

Thank you.

@kyle-hall kyle-hall changed the title fix(runtime-core): test createSlots test(runtime-core): test createSlots Oct 5, 2019
@kyle-hall
Copy link
Contributor Author

I found I could fake the Record here: https://github.com/vuejs/vue-next/blob/caa9297da6ce828e62a17b07303cd761632a5074/packages/compiler-core/src/transforms/transformElement.ts#L365

But, I still don't understand how to set up a Slot to return a VNodeChildren object.

@znck znck self-assigned this Oct 5, 2019
@znck
Copy link
Member

znck commented Oct 5, 2019

Thanks for starting a PR, but I am closing this PR as it's incomplete.

You should create a draft PR, so we can discuss changes first.

@znck znck closed this Oct 5, 2019
@kyle-hall
Copy link
Contributor Author

kyle-hall commented Oct 5, 2019

Okay, thanks. I created #119 for that purpose.

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.

2 participants