1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 03:11:19 +02:00

Allow use of dispose/hide methods on Tooltip & Popover from jQueryInterface, when component does not exists. (#33371)

This commit is contained in:
GeoSot
2021-05-20 16:16:55 +03:00
committed by GitHub
parent de0b797ab2
commit 9e4f87ae8f
4 changed files with 0 additions and 38 deletions

View File

@@ -266,21 +266,6 @@ describe('Popover', () => {
expect(popover.show).toHaveBeenCalled()
})
it('should do nothing if dipose is called when a popover do not exist', () => {
fixtureEl.innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'
const popoverEl = fixtureEl.querySelector('a')
jQueryMock.fn.popover = Popover.jQueryInterface
jQueryMock.elements = [popoverEl]
spyOn(Popover.prototype, 'dispose')
jQueryMock.fn.popover.call(jQueryMock, 'dispose')
expect(Popover.prototype.dispose).not.toHaveBeenCalled()
})
})
describe('getInstance', () => {