Skip to content

Commit 3ee6c9b

Browse files
committed
chore: update example
1 parent f479638 commit 3ee6c9b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/resources/components/Form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
33
Form
4-
<slot />
4+
<slot :username="'blah'" />
55
</div>
66
</template>

test/resources/components/LoginForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Form>
33
<template v-slot="{ username }">
4-
<FormError :show="true" />
4+
<FormError :show="username" />
55
</template>
66
</Form>
77
</template>

test/specs/mounting-options/slots.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import ComponentWithParentName from '~resources/components/component-with-parent
66
import { describeWithShallowAndMount, vueVersion } from '~resources/utils'
77
import { itDoNotRunIf } from 'conditional-specs'
88
import LoginForm, { FormError } from '~resources/components/LoginForm.vue'
9-
import { mount, createLocalVue, shallowMount } from 'packages/test-utils/src'
9+
import { mount, createLocalVue } from 'packages/test-utils/src'
1010

11-
it('fails to reproduce https://github.com/vuejs/vue-test-utils/issues/1766', () => {
11+
it.only('fails to reproduce https://github.com/vuejs/vue-test-utils/issues/1766', () => {
1212
const localVue = createLocalVue()
13-
const wrapper = shallowMount(LoginForm, { localVue })
14-
expect(wrapper.findComponent(FormError).props('show')).toBeTruthy()
13+
const wrapper = mount(LoginForm, { localVue })
14+
expect(wrapper.findComponent(FormError).props('show')).toBe('blah')
1515
})
1616

1717
describeWithShallowAndMount('options.slots', mountingMethod => {

0 commit comments

Comments
 (0)