Co-authored-by: XhmikosR <xhmikosr@gmail.com>
}
hide() {
+ if (!this._popper) {
+ return
+ }
+
const tip = this.getTipElement()
const complete = () => {
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tooltip.show()
})
+
+ it('should not throw error running hide if popper hasn\'t been shown', () => {
+ fixtureEl.innerHTML = '<div></div>'
+
+ const div = fixtureEl.querySelector('div')
+ const tooltip = new Tooltip(div)
+
+ try {
+ tooltip.hide()
+ expect().nothing()
+ } catch {
+ throw new Error('should not throw error')
+ }
+ })
})
describe('update', () => {