2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

tests: minor cleanup (#35138)

* tests: minor cleanup

* tests: use the util noop function
This commit is contained in:
XhmikosR
2021-10-08 12:32:11 +03:00
committed by GitHub
parent eb0f705621
commit a260967a55
18 changed files with 19 additions and 57 deletions
+3 -5
View File
@@ -1,8 +1,6 @@
import Dropdown from '../../src/dropdown'
import EventHandler from '../../src/dom/event-handler'
import { noop } from '../../src/util'
/** Test helpers */
import { noop } from '../../src/util/index'
import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture'
describe('Dropdown', () => {
@@ -225,7 +223,7 @@ describe('Dropdown', () => {
const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]')
const dropdown = new Dropdown(btnDropdown)
document.documentElement.ontouchstart = () => {}
document.documentElement.ontouchstart = noop
spyOn(EventHandler, 'on')
spyOn(EventHandler, 'off')
@@ -891,7 +889,7 @@ describe('Dropdown', () => {
const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]')
const dropdown = new Dropdown(btnDropdown)
document.documentElement.ontouchstart = () => {}
document.documentElement.ontouchstart = noop
spyOn(EventHandler, 'off')
btnDropdown.addEventListener('shown.bs.dropdown', () => {