mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 03:11:19 +02:00
JS: tests fixes & standardization of spies usage (#36398)
* Fix carousel spec typo * Change carousel test name in align with testing method * Make the spies declarations the same everywhere
This commit is contained in:
committed by
GitHub
parent
78c0ad8044
commit
d388bd6e1b
@@ -163,7 +163,7 @@ describe('Swipe', () => {
|
||||
deleteDocumentElementOntouchstart()
|
||||
|
||||
const swipe = new Swipe(swipeEl)
|
||||
spyOn(swipe, '_handleSwipe')
|
||||
const spy = spyOn(swipe, '_handleSwipe')
|
||||
|
||||
mockSwipeGesture(swipeEl, {
|
||||
pos: [300, 10],
|
||||
@@ -173,7 +173,7 @@ describe('Swipe', () => {
|
||||
})
|
||||
|
||||
restorePointerEvents()
|
||||
expect(swipe._handleSwipe).not.toHaveBeenCalled()
|
||||
expect(spy).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should allow swipeRight and call "rightCallback" with pointer events', () => {
|
||||
|
Reference in New Issue
Block a user