diff options
Diffstat (limited to 'js/tests/unit/tooltip.spec.js')
-rw-r--r-- | js/tests/unit/tooltip.spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js index 0a98096a40..3e5c917940 100644 --- a/js/tests/unit/tooltip.spec.js +++ b/js/tests/unit/tooltip.spec.js @@ -717,6 +717,20 @@ describe('Tooltip', () => { 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', () => { |