mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
Remove Manipulator.toggleClass
(#31842)
It's only used in one place so it makes more sense to remove it for the time being.
This commit is contained in:
@@ -129,30 +129,4 @@ describe('Manipulator', () => {
|
||||
expect(position.left).toEqual(jasmine.any(Number))
|
||||
})
|
||||
})
|
||||
|
||||
describe('toggleClass', () => {
|
||||
it('should not error out if element is null or undefined', () => {
|
||||
Manipulator.toggleClass(null, 'test')
|
||||
Manipulator.toggleClass(undefined, 'test')
|
||||
expect().nothing()
|
||||
})
|
||||
|
||||
it('should add class if it is missing', () => {
|
||||
fixtureEl.innerHTML = '<div></div>'
|
||||
|
||||
const div = fixtureEl.querySelector('div')
|
||||
|
||||
Manipulator.toggleClass(div, 'test')
|
||||
expect(div.classList.contains('test')).toEqual(true)
|
||||
})
|
||||
|
||||
it('should remove class if it is set', () => {
|
||||
fixtureEl.innerHTML = '<div class="test"></div>'
|
||||
|
||||
const div = fixtureEl.querySelector('div')
|
||||
|
||||
Manipulator.toggleClass(div, 'test')
|
||||
expect(div.classList.contains('test')).toEqual(false)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user