Skip to content

Commit 893c530

Browse files
committed
fix(b-skeleton-img): pass attributes only image element
1 parent 6449137 commit 893c530

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/components/skeleton/skeleton-img.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ export const BSkeletonImg = /*#__PURE__*/ Vue.extend({
4444
})
4545
)
4646

47-
return props.noAspect ? $img : h(BAspect, mergeData(data, { props: { aspect } }), [$img])
47+
return props.noAspect ? $img : h(BAspect, { props: { aspect } }, [$img])
4848
}
4949
})

src/components/skeleton/skeleton-img.spec.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,13 @@ describe('skeleton-img', () => {
126126

127127
it('accepts custom classes', async () => {
128128
const wrapper = mount(BSkeletonImg, {
129-
propsData: {
130-
noAspect: true
131-
},
132129
context: {
133130
class: ['foobar']
134131
}
135132
})
136133

137-
expect(wrapper.classes()).toContain('b-skeleton-img')
138-
expect(wrapper.classes()).toContain('foobar')
134+
expect(wrapper.find('.b-aspect-content > .b-skeleton-img').exists()).toBe(true)
135+
expect(wrapper.find('.b-aspect-content > .b-skeleton-img').classes()).toContain('foobar')
139136

140137
wrapper.destroy()
141138
})

0 commit comments

Comments
 (0)