From 455725773f8aa0f468d4d677cde53537952e0501 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Fri, 12 Feb 2021 11:58:23 +0530 Subject: [PATCH] Add the missing expectations for touch events --- js/tests/unit/carousel.spec.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index 5c45efe0c10f..2f47f2e00d37 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)