Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohit Sharma <rohit2sharma95@gmail.com>2021-02-12 09:36:20 +0300
committerGitHub <noreply@github.com>2021-02-12 09:36:20 +0300
commit6b6db4fd8a9aa79d99982c6cdc9a3dc3c78e4c6d (patch)
tree66d5d0f668d4509a1ccca7215c6e07f138e85c8b
parent02dbd87ffa94ff0d2f5bbc43a13f13033ce01f0b (diff)
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 5c45efe0c1..2f47f2e00d 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)