test(image): inherit attrs

This commit is contained in:
07akioni 2021-07-08 00:06:22 +08:00
parent cfff4e8b82
commit 14a8bed3cd

View File

@ -64,4 +64,13 @@ describe('n-image', () => {
expect(document.querySelector('.n-image-preview-toolbar')).not.toEqual(null)
})
it('should inherit attrs', () => {
const wrapper = mount(NImage, {
attrs: {
'data-cool': true
}
})
expect(wrapper.find('[data-cool]').exists()).toEqual(true)
})
})