mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-11 18:02:28 +03:00
allow to pass popper.js configuration for tooltip/popover and dropdown
This commit is contained in:
@@ -108,6 +108,21 @@ describe('Tooltip', () => {
|
||||
|
||||
tooltipInContainerEl.click()
|
||||
})
|
||||
|
||||
it('should allow to pass config to popper.js thanks to popperConfig', () => {
|
||||
fixtureEl.innerHTML = '<a href="#" rel="tooltip"/>'
|
||||
|
||||
const tooltipEl = fixtureEl.querySelector('a')
|
||||
const tooltip = new Tooltip(tooltipEl, {
|
||||
popperConfig: {
|
||||
placement: 'left'
|
||||
}
|
||||
})
|
||||
|
||||
const popperConfig = tooltip._getPopperConfig('top')
|
||||
|
||||
expect(popperConfig.placement).toEqual('left')
|
||||
})
|
||||
})
|
||||
|
||||
describe('enable', () => {
|
||||
|
||||
Reference in New Issue
Block a user