aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/carousel.spec.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-09-07 21:49:51 +0300
committerGitHub <[email protected]>2021-09-07 21:49:51 +0300
commit65413de3131294cbf7bc8bff94914cc8062149c6 (patch)
treed606f927ef9d5e505245b0fce29366979d219f83 /js/tests/unit/carousel.spec.js
parent72e79d0e3997c3a850263880240f26684b9784f7 (diff)
parent0d81d3cbc14dfcdca8a868e3f25189a4f1ab273c (diff)
downloadbootstrap-docs-offcanvas-navbar.tar.xz
bootstrap-docs-offcanvas-navbar.zip
Merge branch 'main' into docs-offcanvas-navbardocs-offcanvas-navbar
Diffstat (limited to 'js/tests/unit/carousel.spec.js')
-rw-r--r--js/tests/unit/carousel.spec.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js
index 97482537a..a933f1eda 100644
--- a/js/tests/unit/carousel.spec.js
+++ b/js/tests/unit/carousel.spec.js
@@ -14,7 +14,7 @@ describe('Carousel', () => {
const stylesCarousel = document.createElement('style')
stylesCarousel.type = 'text/css'
- stylesCarousel.appendChild(document.createTextNode(cssStyleCarousel))
+ stylesCarousel.append(document.createTextNode(cssStyleCarousel))
const clearPointerEvents = () => {
window.PointerEvent = null
@@ -345,7 +345,7 @@ describe('Carousel', () => {
}
document.documentElement.ontouchstart = () => {}
- document.head.appendChild(stylesCarousel)
+ document.head.append(stylesCarousel)
Simulator.setType('pointer')
fixtureEl.innerHTML = [
@@ -371,7 +371,7 @@ describe('Carousel', () => {
expect(item.classList.contains('active')).toEqual(true)
expect(carousel._slide).toHaveBeenCalledWith('right')
expect(event.direction).toEqual('right')
- document.head.removeChild(stylesCarousel)
+ stylesCarousel.remove()
delete document.documentElement.ontouchstart
done()
})
@@ -390,7 +390,7 @@ describe('Carousel', () => {
}
document.documentElement.ontouchstart = () => {}
- document.head.appendChild(stylesCarousel)
+ document.head.append(stylesCarousel)
Simulator.setType('pointer')
fixtureEl.innerHTML = [
@@ -416,7 +416,7 @@ describe('Carousel', () => {
expect(item.classList.contains('active')).toEqual(false)
expect(carousel._slide).toHaveBeenCalledWith('left')
expect(event.direction).toEqual('left')
- document.head.removeChild(stylesCarousel)
+ stylesCarousel.remove()
delete document.documentElement.ontouchstart
done()
})