mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 16:50:00 +02:00
Enable a few eslint-config-xo rules (#34620)
* unicorn/prefer-dom-node-append * unicorn/prefer-dom-node-remove
This commit is contained in:
@@ -368,10 +368,10 @@ describe('EventHandler', () => {
|
||||
it('should remove the correct delegated event listener', () => {
|
||||
const element = document.createElement('div')
|
||||
const subelement = document.createElement('span')
|
||||
element.appendChild(subelement)
|
||||
element.append(subelement)
|
||||
|
||||
const anchor = document.createElement('a')
|
||||
element.appendChild(anchor)
|
||||
element.append(anchor)
|
||||
|
||||
let i = 0
|
||||
const handler = () => {
|
||||
@@ -381,7 +381,7 @@ describe('EventHandler', () => {
|
||||
EventHandler.on(element, 'click', 'a', handler)
|
||||
EventHandler.on(element, 'click', 'span', handler)
|
||||
|
||||
fixtureEl.appendChild(element)
|
||||
fixtureEl.append(element)
|
||||
|
||||
EventHandler.trigger(anchor, 'click')
|
||||
EventHandler.trigger(subelement, 'click')
|
||||
|
@@ -151,7 +151,7 @@ describe('Manipulator', () => {
|
||||
const { defaultView: win, body } = fixtureEl.ownerDocument
|
||||
const forceScrollBars = document.createElement('div')
|
||||
forceScrollBars.style.cssText = 'position:absolute;top:5000px;left:5000px;width:1px;height:1px'
|
||||
body.appendChild(forceScrollBars)
|
||||
body.append(forceScrollBars)
|
||||
|
||||
const scrollHandler = () => {
|
||||
expect(window.pageYOffset).toBe(scrollY)
|
||||
@@ -165,7 +165,7 @@ describe('Manipulator', () => {
|
||||
})
|
||||
|
||||
win.removeEventListener('scroll', scrollHandler)
|
||||
body.removeChild(forceScrollBars)
|
||||
forceScrollBars.remove()
|
||||
win.scrollTo(0, 0)
|
||||
done()
|
||||
}
|
||||
|
Reference in New Issue
Block a user