diff options
author | GeoSot <geo.sotis@gmail.com> | 2022-02-19 16:10:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-19 16:10:47 +0300 |
commit | 407af8ac7f9296627aebc1e4c5d0ee948f8be1f3 (patch) | |
tree | 1377c19a20a78fcfe2b8515c44967243f0e9307e /js/tests | |
parent | 642d756eeaf107bed2baac931933c9350c33f5c1 (diff) |
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
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/unit/popover.spec.js | 8 | ||||
-rw-r--r-- | js/tests/unit/tooltip.spec.js | 6 |
2 files changed, 1 insertions, 13 deletions
diff --git a/js/tests/unit/popover.spec.js b/js/tests/unit/popover.spec.js index bf3a71848c..d1a4c78478 100644 --- a/js/tests/unit/popover.spec.js +++ b/js/tests/unit/popover.spec.js @@ -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() }) diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js index 0713dabfb6..c961744dfd 100644 --- a/js/tests/unit/tooltip.spec.js +++ b/js/tests/unit/tooltip.spec.js @@ -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') |