mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-17 13:20:52 +08:00
test(tooltip): update test (#2255)
This commit is contained in:
parent
93b0d7f22b
commit
04ba253c2d
@ -9,4 +9,19 @@ describe('n-tooltip', () => {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
it('should work with `show` props', async () => {
|
||||
const wrapper = mount(NTooltip, {
|
||||
slots: {
|
||||
default: () => 'test-default',
|
||||
trigger: () => 'test-trigger'
|
||||
},
|
||||
attachTo: document.body
|
||||
})
|
||||
expect(document.querySelector('.n-tooltip')).toEqual(null)
|
||||
|
||||
await wrapper.setProps({ show: true })
|
||||
expect(document.querySelector('.n-tooltip')).not.toEqual(null)
|
||||
wrapper.unmount()
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user