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

Make event name helper and use it on tooltip & popover to reduce dist sizes (#35856)

* feat: create eventName getter function in baseComponent

* refactor: use `eventName` getter on tooltip & popover
This commit is contained in:
GeoSot
2022-02-19 15:10:47 +02:00
committed by GitHub
parent 642d756eea
commit 407af8ac7f
5 changed files with 27 additions and 69 deletions

View File

@@ -43,12 +43,6 @@ describe('Popover', () => {
})
})
describe('Event', () => {
it('should return plugin events', () => {
expect(Popover.Event).toEqual(jasmine.any(Object))
})
})
describe('EVENT_KEY', () => {
it('should return plugin event key', () => {
expect(Popover.EVENT_KEY).toEqual('.bs.popover')
@@ -174,7 +168,7 @@ describe('Popover', () => {
popover.show()
expect(EventHandler.trigger).not.toHaveBeenCalledWith(popoverEl, Popover.Event.SHOW)
expect(EventHandler.trigger).not.toHaveBeenCalledWith(popoverEl, Popover.eventName('show'))
expect(document.querySelector('.popover')).toBeNull()
})

View File

@@ -42,12 +42,6 @@ describe('Tooltip', () => {
})
})
describe('Event', () => {
it('should return plugin events', () => {
expect(Tooltip.Event).toEqual(jasmine.any(Object))
})
})
describe('EVENT_KEY', () => {
it('should return plugin event key', () => {
expect(Tooltip.EVENT_KEY).toEqual('.bs.tooltip')