Navigation Menu

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

vue-test-utils: allow false as a component stub value #1231

Merged
merged 1 commit into from May 16, 2019

Conversation

garyo
Copy link
Contributor

@garyo garyo commented May 10, 2019

Updated types/index.d.ts to allow false to be passed as a component stub value
in mount or shallowMount. false in this case means don't use a stub for the
given component.

@@ -22,7 +22,7 @@ type Slots = {
* If it is an array of string, the specified children are replaced by blank components
*/
type Stubs = {
[key: string]: Component | string | true
[key: string]: Component | string | true | false
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[key: string]: Component | string | true | false
[key: string]: Component | string | boolean

@eddyerburgh
Copy link
Member

Can you also update the type file in packages/server-test-utils/types/index.d.ts?

@garyo
Copy link
Contributor Author

garyo commented May 13, 2019

done.

@eddyerburgh
Copy link
Member

Hi @garyo, there's another types file for the @vue/server-test-utils package that's in packages/server-test-utils/types/index.d.ts that also needs to be updated. Can you make the changes in that file too?

Updated types/index.d.ts to allow false to be passed as a component stub value
in mount or shallowMount. `false` in this case means don't use a stub for the
given component.
Also updated server-test-utils.
@garyo
Copy link
Contributor Author

garyo commented May 15, 2019

Sorry, I had that fix queued up, just forgot to add it! Here you go. This time for sure. :-)

@eddyerburgh eddyerburgh merged commit 2a4c6ef into vuejs:dev May 16, 2019
@eddyerburgh
Copy link
Member

Thanks :)

@vue-bot
Copy link

vue-bot commented May 16, 2019

Thanks again! Cheers! 💚

@Seminioni
Copy link

Seminioni commented Jun 3, 2019

@eddyerburgh when this fix will be available in public release?

@eddyerburgh
Copy link
Member

By September 15 latest

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

4 participants