aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohit Sharma <[email protected]>2021-02-12 12:06:20 +0530
committerGitHub <[email protected]>2021-02-12 08:36:20 +0200
commit6b6db4fd8a9aa79d99982c6cdc9a3dc3c78e4c6d (patch)
tree66d5d0f668d4509a1ccca7215c6e07f138e85c8b
parent02dbd87ffa94ff0d2f5bbc43a13f13033ce01f0b (diff)
downloadbootstrap-6b6db4fd8a9aa79d99982c6cdc9a3dc3c78e4c6d.tar.xz
bootstrap-6b6db4fd8a9aa79d99982c6cdc9a3dc3c78e4c6d.zip
Add the missing expectations for touch events (#33060)
-rw-r--r--js/tests/unit/carousel.spec.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js
index 5c45efe0c..2f47f2e00 100644
--- a/js/tests/unit/carousel.spec.js
+++ b/js/tests/unit/carousel.spec.js
@@ -1071,8 +1071,16 @@ describe('Carousel', () => {
['keydown', jasmine.any(Function), jasmine.any(Boolean)],
['mouseover', jasmine.any(Function), jasmine.any(Boolean)],
['mouseout', jasmine.any(Function), jasmine.any(Boolean)],
- ['pointerdown', jasmine.any(Function), jasmine.any(Boolean)],
- ['pointerup', jasmine.any(Function), jasmine.any(Boolean)]
+ ...(carousel._pointerEvent ?
+ [
+ ['pointerdown', jasmine.any(Function), jasmine.any(Boolean)],
+ ['pointerup', jasmine.any(Function), jasmine.any(Boolean)]
+ ] :
+ [
+ ['touchstart', jasmine.any(Function), jasmine.any(Boolean)],
+ ['touchmove', jasmine.any(Function), jasmine.any(Boolean)],
+ ['touchend', jasmine.any(Function), jasmine.any(Boolean)]
+ ])
]
expect(addEventSpy.calls.allArgs()).toEqual(expectedArgs)