diff --git a/js/tests/unit/alert.spec.js b/js/tests/unit/alert.spec.js index a1322f1c7b92..916c7fd07c6d 100644 --- a/js/tests/unit/alert.spec.js +++ b/js/tests/unit/alert.spec.js @@ -19,6 +19,12 @@ describe('Alert', () => { expect(typeof Alert.VERSION).toEqual('string') }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Alert.DATA_KEY).toEqual('bs.alert') + }) + }) + describe('data-api', () => { it('should close an alert without instantiating it manually', () => { fixtureEl.innerHTML = [ diff --git a/js/tests/unit/button.spec.js b/js/tests/unit/button.spec.js index 51aa73774c45..e442fd90d0a1 100644 --- a/js/tests/unit/button.spec.js +++ b/js/tests/unit/button.spec.js @@ -24,6 +24,12 @@ describe('Button', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Button.DATA_KEY).toEqual('bs.button') + }) + }) + describe('data-api', () => { it('should toggle active class on click', () => { fixtureEl.innerHTML = [ diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index 2f47f2e00d37..533e1ba7e253 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -45,6 +45,12 @@ describe('Carousel', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Carousel.DATA_KEY).toEqual('bs.carousel') + }) + }) + describe('constructor', () => { it('should go to next item if right arrow key is pressed', done => { fixtureEl.innerHTML = [ diff --git a/js/tests/unit/collapse.spec.js b/js/tests/unit/collapse.spec.js index ff493cf51aa8..cd30ed8daa8d 100644 --- a/js/tests/unit/collapse.spec.js +++ b/js/tests/unit/collapse.spec.js @@ -27,6 +27,12 @@ describe('Collapse', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Collapse.DATA_KEY).toEqual('bs.collapse') + }) + }) + describe('constructor', () => { it('should allow jquery object in parent config', () => { fixtureEl.innerHTML = [ diff --git a/js/tests/unit/dropdown.spec.js b/js/tests/unit/dropdown.spec.js index 04c35059e7be..658cb65b04ad 100644 --- a/js/tests/unit/dropdown.spec.js +++ b/js/tests/unit/dropdown.spec.js @@ -33,6 +33,12 @@ describe('Dropdown', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Dropdown.DATA_KEY).toEqual('bs.dropdown') + }) + }) + describe('constructor', () => { it('should add a listener on trigger which do not have data-bs-toggle="dropdown"', () => { fixtureEl.innerHTML = [ diff --git a/js/tests/unit/modal.spec.js b/js/tests/unit/modal.spec.js index 29c90bbf1288..8a159eef6c98 100644 --- a/js/tests/unit/modal.spec.js +++ b/js/tests/unit/modal.spec.js @@ -56,6 +56,12 @@ describe('Modal', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Modal.DATA_KEY).toEqual('bs.modal') + }) + }) + describe('toggle', () => { it('should toggle a modal', done => { fixtureEl.innerHTML = '' diff --git a/js/tests/unit/scrollspy.spec.js b/js/tests/unit/scrollspy.spec.js index 917593f3987c..a00da485f8d2 100644 --- a/js/tests/unit/scrollspy.spec.js +++ b/js/tests/unit/scrollspy.spec.js @@ -47,6 +47,12 @@ describe('ScrollSpy', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(ScrollSpy.DATA_KEY).toEqual('bs.scrollspy') + }) + }) + describe('constructor', () => { it('should generate an id when there is not one', () => { fixtureEl.innerHTML = [ diff --git a/js/tests/unit/toast.spec.js b/js/tests/unit/toast.spec.js index 44f74aa36dab..f8ef6e54b4bd 100644 --- a/js/tests/unit/toast.spec.js +++ b/js/tests/unit/toast.spec.js @@ -20,6 +20,12 @@ describe('Toast', () => { }) }) + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Toast.DATA_KEY).toEqual('bs.toast') + }) + }) + describe('constructor', () => { it('should allow to config in js', done => { fixtureEl.innerHTML = [