Skip to content

Commit 5c63cc6

Browse files
committed
Unsuccessfully repro test
1 parent 089a6ca commit 5c63cc6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/specs/shallow-mount.spec.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,34 @@ describeRunIf(process.env.TEST_ENV !== 'node', 'shallowMount', () => {
9696
)
9797
})
9898

99+
it('renders named slots with v-slot syntax', () => {
100+
const localVue = createLocalVue()
101+
localVue.component('Foo', {
102+
template: '<div><slot name="newSyntax" /></div>'
103+
})
104+
const TestComponent = {
105+
template: `
106+
<Foo>
107+
<template v-slot:newSyntax>
108+
<p class="new-example">text</p>
109+
</template>
110+
</Foo>
111+
`
112+
}
113+
const wrapper = shallowMount(TestComponent, {
114+
localVue
115+
})
116+
117+
expect(wrapper.find({ name: 'Foo' }).exists()).to.equal(true);
118+
expect(wrapper.find(".new-example").exists()).to.equal(true);
119+
expect(wrapper.html()).to.equal(
120+
'<foo-stub>\n' +
121+
' <p class="new-example">text</p>\n' +
122+
'</foo-stub>'
123+
)
124+
})
125+
126+
99127
it('renders no children if none supplied', () => {
100128
const TestComponent = {
101129
template: '<child />',

0 commit comments

Comments
 (0)