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 = [
})
})
+ 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 = [
})
})
+ 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 = [
})
})
+ 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 = [
})
})
+ 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 = [
})
})
+ 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 = '<div class="modal"><div class="modal-dialog"></div></div>'
})
})
+ 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 = [
})
})
+ 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 = [